Created
March 4, 2014 11:24
-
-
Save jimmylarkin/9344703 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public partial class LoadingDialog : BaseMetroDialog | |
| { | |
| public static readonly DependencyProperty MessageProperty = DependencyProperty.Register("Message", typeof(string), typeof(MessageDialog), new PropertyMetadata(default(string))); | |
| internal LoadingDialog(MetroWindow parentWindow) | |
| : this(parentWindow, null) | |
| { | |
| } | |
| internal LoadingDialog(MetroWindow parentWindow, MetroDialogSettings settings) | |
| : base(parentWindow, settings) | |
| { | |
| InitializeComponent(); | |
| } | |
| public string Message | |
| { | |
| get { return (string)GetValue(MessageProperty); } | |
| set { SetValue(MessageProperty, value); } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Dialogs:BaseMetroDialog x:Class="McKinsey.MarketSimulator.Controls.LoadingDialog" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:Controls="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro" | |
| xmlns:Dialogs="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro" | |
| xmlns:local="clr-namespace:McKinsey.MarketSimulator.Controls" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| mc:Ignorable="d" | |
| d:DesignHeight="300" d:DesignWidth="300"> | |
| <Dialogs:BaseMetroDialog.DialogBody> | |
| <Grid> | |
| <Grid.RowDefinitions> | |
| <RowDefinition Height="*" /> | |
| <RowDefinition Height="Auto" /> | |
| </Grid.RowDefinitions> | |
| <TextBlock Margin="0 5 0 0" | |
| FontSize="15" | |
| Text="{Binding Message, RelativeSource={RelativeSource AncestorType=local:LoadingDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" | |
| TextWrapping="Wrap" | |
| Grid.Row="0" | |
| Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=local:LoadingDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" /> | |
| </Grid> | |
| </Dialogs:BaseMetroDialog.DialogBody> | |
| </Dialogs:BaseMetroDialog> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment