feat: add disable container.
This commit is contained in:
16
src/Ursa.Themes.Semi/Controls/DisableContainer.axaml
Normal file
16
src/Ursa.Themes.Semi/Controls/DisableContainer.axaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:shapes="clr-namespace:Ursa.Controls.Shapes;assembly=Ursa">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme TargetType="u:DisableContainer" x:Key="{x:Type u:DisableContainer}">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="u:DisableContainer">
|
||||
<Panel>
|
||||
<ContentPresenter Content="{TemplateBinding Content}"></ContentPresenter>
|
||||
<shapes:PureRectangle Background="Transparent" IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.IsEnabled, Converter={x:Static BoolConverters.Not}}" Cursor="No" ToolTip.Tip="{TemplateBinding DisabledTip}"/>
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user