设置默认FlowDirection Wpf工具包扩展MessageBox

时间:2012-08-20 23:30:10

标签: c# wpf wpftoolkit

无法为WPF Toolkit Extended 1.6 MessageBox 动态设置默认的flowdirection属性,是否有任何方法可以在代码和&在运行时知道我有一个静态字段myFlowDirection

我试过工作正常&它会改变流量,但我需要它动态

        <Style TargetType="{x:Type toolkit:MessageBox}">
        <Setter Property="FlowDirection"  Value="RightToLeft"/>
        </Style>

此MessageBox无法派生&amp;没有构造函数

2 个答案:

答案 0 :(得分:1)

只是一个猜测,但您是否尝试过绑定Setter属性?

此链接是来自SO的问题,听起来与您的相似:

WPF binding to another property's binding in a style

这是另一个例子:

http://forums.silverlight.net/t/130096.aspx/1

答案 1 :(得分:0)

是的,您可以通过 MessageBoxOptions.RtlReading

设置消息框 FlowDirection

例如:

MessageBox.Show("Your RTL Text", "Message Box Title", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.None, MessageBoxOptions.RtlReading);