public PropertiesDialog() { Dlg = new FloatingDialog(); Dlg.MinHeight = 150; Dlg.MinWidth = 200; Dlg.Height = 300; Dlg.Width = 400; Dlg.Caption = Localization.PropertiesDialog_Caption; Grid container = new Grid(); container.Margin = new Thickness(5, 5, 5, 5); container.RowDefinitions.Add(new RowDefinition()); container.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto }); PropertiesControl = new PropertiesControl(); container.Children.Add(PropertiesControl); // Кнопки диалога StackPanel buttonsPanel = new StackPanel() { Orientation = Orientation.Horizontal, HorizontalAlignment = HorizontalAlignment.Right }; container.Children.Add(buttonsPanel); Grid.SetRow(buttonsPanel, 3); RanetButton OkButton = new RanetButton() { Width = 70, Height = 22, HorizontalAlignment = HorizontalAlignment.Right, Margin = new Thickness(0, 5, 0, 0) }; OkButton.Content = "OK"; OkButton.Click += (ev_sender, args) => { Dlg.Close(); }; buttonsPanel.Children.Add(OkButton); Dlg.SetContent(container); }
void CancelButton_Click(object sender, RoutedEventArgs e) { m_Dialog.Close(); }