Windows form host showing in Datagrid but not in DialogHost.
See original GitHub issueWhen using this DLL IPAddressControl` is made for forms in WPF like
<TextBlock Style="{StaticResource MaterialDesignDisplay1TextBlock}" TextWrapping="Wrap" HorizontalAlignment="Center">Database servers</TextBlock> <WindowsFormsHost Width="120"> <ipBox:IPAddressControl /> </WindowsFormsHost>
It is showing correctly as
But while the same element , If I am using in Dialoghost it is not showing. ` <Button Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}" Margin="0 20 0 0" Width="140" HorizontalAlignment="Right">Add New Server <Button.CommandParameter> <StackPanel Margin="16"> <TextBlock>Add a new Server</TextBlock>
<!--<WindowsFormsHost wpf:HintAssist.Hint="Server IP" Height="27" Width="100">
<ipBox:IPAddressControl x:Name="IPAddress" />
</WindowsFormsHost>-->
<StackPanel x:Name="ipStack">
<WindowsFormsHost Width="120">
<ipBox:IPAddressControl x:Name="IPAddresss" />
</WindowsFormsHost>
</StackPanel>
<TextBox wpf:HintAssist.Hint="Notes" Style="{StaticResource MaterialDesignTextAreaTextBox}"
VerticalScrollBarVisibility="Auto" Margin="0 15 0 0" FontSize="16" Grid.Row="2" MaxLength="500" Width="400"
VerticalAlignment="Top" Height="100" AcceptsReturn="True" TextWrapping="Wrap">
<TextBox.Text>
<Binding Path="Notes" UpdateSourceTrigger="PropertyChanged"> </Binding>
</TextBox.Text>
</TextBox>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
<Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True"
Command="{Binding AddnewCommand}"> Add </Button>
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True"
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}">Cancel</Button>
</StackPanel>
</StackPanel>
</Button.CommandParameter>
</Button>`
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
WindowsFormsHost in WPF Not Displaying Hosted ...
It is used to host an individual Windows Forms control in a WPF view. If you want to get a handle to the...
Read more >Host a Windows Forms composite control in WPF
This walkthrough steps you through an application that hosts a Windows Forms composite control to perform data entry in a WPF application.
Read more >Making Sense of the Material Design in XAML Dialog Host
Material Design In XAML Dialog Host: learn about this powerful control that displays info and prompts the user when info is required.
Read more >C#/WPF - Fixing DialogHost bugs in Material Design in XAML
In this live stream we work on addressing various bugs with the DialogHost control. Material Design In XAML Project: ...
Read more >Creating Lookup Screens using ASP.NET, XML and JavaScript
Lookup screens are dialog boxes that allow you to pick a value from a list of values. This article tells you how to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You’ll need to add the ResourceDictionary inside the DialogHost if it isn’t inside App.xaml.
See previous comment for fix.