-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Add dialog style Settings #84
Comments
需要使用 DialogWindow 来去修改 对话框窗口的样式 需要新建一个 window 实现IDialogWindow接口,像这样 public partial class TestDialogWindow : Window, IDialogWindow
{
public TestDialogWindow()
{
InitializeComponent();
}
public IDialogResult? Result { get; set; }
object? IDialogWindow.Content { get => null; set { if (value != null) Dock.Children[1] = (Control)value; } }
} xaml <Window.Styles>
<Style Selector="Window">
<Setter Property="SizeToContent" Value="WidthAndHeight" />
</Style>
</Window.Styles>
<Border Padding="2 2 2 2">
<DockPanel MinWidth="200" x:Name="Dock" LastChildFill="True">
<Border DockPanel.Dock="Top" Height="40">
<Label Content="{Binding Title}" VerticalAlignment="Center" HorizontalContentAlignment="Left" />
</Border>
<Border />
</DockPanel>
</Border> 然后注册DialogWindow 和 Dialog containerRegistry.RegisterDialog<LoadingBox, LoadingBoxViewModel>(nameof(LoadingBox));
containerRegistry.RegisterDialogWindow<TestDialogWindow>("test"); 使用的时候 需要这样使用 |
What you described above is a custom pop-up style, which is no problem. Imagine if you customize a pop-up style, but some internal parameters need to be assigned according to actual use, for example, I need to give a title tag to the pop-up frame, or I need to change the color of a certain style, and so on. How should these be implemented? In the wpf version of prism, it is possible to modify it according to the style, but the avalonia version of prism does not support it. Although I have implemented it through other ways, it is very troublesome |
是的,它还不够完美,我也试图只通过样式来修改,但是它不起作用,确实这种方法比较麻烦 |
Description
Dialog style Settings are currently invalid, whether to add this feature, in the wpf version of prism is supported to set dialog style, this feature is still important
Context
The text was updated successfully, but these errors were encountered: