Table of Contents [Hide/Show]
DialogServiceArgs ExampleGenericViewDialog Properties Methods EventsShowViewModelShowPanel Xaml Example ShowPanel ExampleShowMessage ShowMessage(string message) Example ShowMessage(string message,Timespan expireTimespan) Example ShowMessage(MessageViewModel message, TimeSpan timeSpan) Example MessageViewModel PropertiesSee Also
The location of the buttons is titlebar of the floatablewindow
var dialog args=new DialogServiceArgs { Id = "Sample", Title = "Sample Component Title", HelpId = "tools;" + GetType().FullName, Icon = Icon, ShowSettingsOnBack = true, SettingsViewModel = SettingsViewModel, HasCloseButton = true, HasMinimize = false }
GenericDialogViewModel ShowViewModel(IComponentBase parentViewModel, object childViewModel, Action<ErrorEventArgs> errorHandler) GenericDialogViewModel ShowViewModel(object viewModel, string id) GenericDialogViewModel ShowViewModel(object viewModel, DialogServiceArgs args)GenericDialogViewModel ShowViewModel(object viewModel, DialogServiceArgs args, Action<ErrorEventArgs> errorHandler) GenericDialogViewModel ShowViewModel(IComponentBase viewModel) GenericDialogViewModel ShowViewModel(IComponentBase viewModel, DialogServiceArgs args) GenericDialogViewModel ShowViewModel(IComponentBase viewModel, DialogServiceArgs args, Action<ErrorEventArgs> errorHandler)
<UserControl x:Class="FDOT.GIS.Client.Components.Views.DrawToolView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ed="clr-namespace:Microsoft.Expression.Shapes;assembly=Microsoft.Expression.Drawing" xmlns:sdk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input" mc:Ignorable="d" xmlns:Converters="clr-namespace:FDOT.GIS.Client.Converters;assembly=FDOT.GIS.Client" xmlns:controls="clr-namespace:FDOT.GIS.Client.Controls;assembly=FDOT.GIS.Client" xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"> <Grid x:Name="LayoutRoot"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <sdk:Label Grid.Row="0" Grid.Column="0" Content="Draw Color" VerticalAlignment="Center" /> <StackPanel Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" MinWidth="260" MinHeight="20" Margin="0,0,0,5"> <controls:ColorSlider cal:Message.Attach="[Event ColorChanged]=[Action DrawColorChanged($eventArgs)];" HexColor="{Binding CurrentDrawColor, Mode=TwoWay}" /> </StackPanel> <sdk:Label Grid.Row="1" Grid.Column="0" Content="Draw Type" VerticalAlignment="Center" /> <StackPanel Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal"> <controls:ShapeSelector cal:Message.Attach="[Event ShapeSelected]=[Action Draw($eventArgs)];" /> </StackPanel> <sdk:Label Grid.Row="2" Grid.Column="0" Content="Show Labels" VerticalAlignment="Center" /> <controls:SwitchButton Grid.Row="2" Grid.Column="1" IsChecked="{Binding ShowLabels, Mode=TwoWay}" /> <Button Grid.Row="3" Grid.Column="1" Margin="5" Content="Clear" cal:Message.Attach="[Event Click]=[Action Clear()];" /> </Grid> </UserControl>
_dialogViewModel = LayoutManager.Instance.ShowPanel(drawView, new DialogServiceArgs { Title = this.ComponentConfiguration.Name, HelpId = "tools;" + GetType().FullName, Icon = Icon });
Message Example
var messageViewModel = LayoutManager.Instance.ShowMessage("Example");
var messageViewModel=LayoutManager.Instance.ShowMessage("Example", new TimeSpan(0, 0, 10));
var message = new MessageViewModel { ShowProgress = true, Message = "Executing Identify" }; LayoutManager.Instance.ShowMessage(message, TimeSpan.Zero);
Example of Message with Progressbar