forked from MaterialDesignInXAML/MaterialDesignInXamlToolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing issue with ComboBoxes in dialog host (MaterialDesignInXAML#3451)
* Fixing issue with ComboBoxes in dialog host This revert the fix that was done for MaterialDesignInXAML#3249. Need to revisit fix that was done and find an alternative. * Only calling set focus one when dialog is opened.
- Loading branch information
Showing
5 changed files
with
97 additions
and
20 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
MaterialDesignThemes.UITests/Samples/DialogHost/WithComboBox.xaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<UserControl x:Class="MaterialDesignThemes.UITests.Samples.DialogHost.WithComboBox" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:MaterialDesignThemes.UITests.Samples.DialogHost" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" d:DesignWidth="800"> | ||
|
||
<materialDesign:DialogHost x:Name="SampleDialogHost" | ||
Loaded="DialogHost_Loaded"> | ||
<materialDesign:DialogHost.DialogContent> | ||
<Grid Margin="16"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition /> | ||
<RowDefinition /> | ||
<RowDefinition /> | ||
</Grid.RowDefinitions> | ||
<TextBlock Text="Please choose the desired targeted platform " | ||
Margin="6" | ||
FontSize="12" | ||
TextWrapping="Wrap"/> | ||
<ComboBox | ||
x:Name="TargetedPlatformComboBox" | ||
Grid.Row="1" | ||
Width="120" | ||
materialDesign:HintAssist.HelperText="Targetted Platform" | ||
Style="{StaticResource MaterialDesignFloatingHintComboBox}"> | ||
<ComboBoxItem Content="Item1"/> | ||
<ComboBoxItem Content="Item2" x:Name="TargetItem"/> | ||
<ComboBoxItem Content="Item3"/> | ||
</ComboBox> | ||
|
||
</Grid> | ||
</materialDesign:DialogHost.DialogContent> | ||
</materialDesign:DialogHost> | ||
</UserControl> |
17 changes: 17 additions & 0 deletions
17
MaterialDesignThemes.UITests/Samples/DialogHost/WithComboBox.xaml.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace MaterialDesignThemes.UITests.Samples.DialogHost; | ||
|
||
/// <summary> | ||
/// Interaction logic for WithComboBox.xaml | ||
/// </summary> | ||
public partial class WithComboBox : UserControl | ||
{ | ||
public WithComboBox() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void DialogHost_Loaded(object sender, RoutedEventArgs e) | ||
{ | ||
SampleDialogHost.IsOpen = true; | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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