Show / Hide Table of Contents

Class ConditionalUriExtension

Provides conditional System.Uri in XAML markup.

Inheritance
System.Object
System.Windows.Markup.MarkupExtension
ConditionalUriExtension
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: DevZest.Windows
Assembly: DevZest.WpfDocking.dll
Syntax
public class ConditionalUriExtension : MarkupExtension
Remarks

Use this markup extension to avoid System.Security.SecurityException when providing resource dictionary for both full trust and partial trust (XBAP, for example) applications.

Examples

The following example shows how to avoid the System.Security.SecurityException in XBAP application because NativeFloatingWindow requires System.Security.Permissions.UIPermission:

<ResourceDictionary>
    <ResourceDictionary.Source>
        <dz:ConditionalUriExtension
            Condition="{x:Static dz:FloatingWindow.CanBeNative}"
            True="NativeFloatingWindow.xaml"
            False="Empty.xaml" />
    </ResourceDictionary.Source>
</ResourceDictionary>

Properties

Name Description
Condition

Gets the condition to select the System.Uri.

False

Gets the System.Uri when Condition is false.

True

Gets the System.Uri when Condition is true.

Methods

Name Description
ProvideValue(IServiceProvider)
  • Improve this Doc
  • View Source
Back to top Copyright © Weifen Luo | DevZest