Skip to content
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

added support to control DialogWindow propertes from style #1721

Merged
merged 2 commits into from
Feb 28, 2019

Conversation

brianlagunas
Copy link
Member

Description of Change

You can now control the properties of the DialogWindow by using a style via an attaxched property on the Dialog UserControl

    <prism:DialogService.DialogWindowStyle>
        <Style TargetType="Window">
            <Setter Property="ResizeMode" Value="NoResize"/>
            <Setter Property="ShowInTaskbar" Value="False"/>
            <Setter Property="SizeToContent" Value="WidthAndHeight"/>
        </Style>
    </prism:DialogService.DialogWindowStyle>

NOTE I'm not real happy with the location of the attached property and it may be moved to a different class.

API Changes

List all API changes here (or just put None), example:

Added:

  • DialogService.DialogWindowStyle attached property
  • Added IDialogWindow.Style property

PR Checklist

  • Rebased on top of master at time of PR
  • Changes adhere to coding standard

@HartlD
Copy link

HartlD commented Sep 20, 2019

How can I change the window style dynamically via Trigger??
Like:

`<Style TargetType="UserControl">

        <Setter Property="prism:Dialog.WindowStyle" Value="{DynamicResource  DefaultDialogStyleTheme}"></Setter>
        <Style.Triggers>

            <DataTrigger
                Binding="{Binding SecondOne, UpdateSourceTrigger=PropertyChanged}"
                Value="true">                    
                <Setter Property="prism:Dialog.WindowStyle" Value="{DynamicResource DialogStyleTheme}"></Setter>
            </DataTrigger>
        </Style.Triggers>
    </Style>`

@dansiegel
Copy link
Member

@HartlD questions should be asked on StackOverflow

@lock
Copy link

lock bot commented Jan 28, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants