Files
ZuneUIXTools/test/2.1/BUTTON.UIX
T

1184 lines
29 KiB
Plaintext
Raw Normal View History

<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<UIX
xmlns="http://schemas.microsoft.com/2007/uix"
xmlns:iris="assembly://UIX/Microsoft.Iris"
xmlns:sys="assembly://mscorlib/System"
xmlns:col="assembly://mscorlib/System.Collections"
xmlns:style="res://ZuneShellResources!Style.uix"
xmlns:styles="res://ZuneShellResources!Styles.uix"
xmlns:tooltip="res://ZuneShellResources!ToolTip.uix"
xmlns:animations="res://ZuneShellResources!Animations.uix"
xmlns:me="Me">
<UI Name="Default">
<Content>
<Panel Layout="Anchor">
<Children>
<Panel Layout="VerticalFlow">
<Children>
<me:Button>
<Model>
<iris:Command Description="Hello"/>
</Model>
</me:Button>
<me:IconButton>
<Model>
<iris:Command Description="Hello"/>
</Model>
</me:IconButton>
<me:ButtonWithIcon>
<Model>
<iris:Command Description="Hello"/>
</Model>
</me:ButtonWithIcon>
<me:MenuButton>
<Model>
<iris:Command Description="Hello"/>
</Model>
</me:MenuButton>
<me:InputButton>
<Model>
<iris:Command Description="Hello"/>
</Model>
</me:InputButton>
</Children>
</Panel>
</Children>
</Panel>
</Content>
</UI>
<Class Name="ButtonProvider">
<Properties>
<String Name="PrimaryLabel"/>
<String Name="ToolTip"/>
<Boolean Name="Available" Boolean="true"/>
<Boolean Name="Selected"/>
<iris:ICommand Name="ClickCommand" ICommand="{null}"/>
<Object Name="DragValue" Object="{null}"/>
</Properties>
</Class>
<Class Name="ExtendedButtonProvider" Base="me:ButtonProvider">
<Properties>
<String Name="SecondaryLabel"/>
</Properties>
</Class>
<Class Name="ModelButtonProvider" Base="me:ExtendedButtonProvider">
<Properties>
<Object Name="Model" Object="{null}"/>
<Index Name="Index" Index="{null}"/>
<SelectionManager Name="SelectionManager" SelectionManager="{null}"/>
<Object Name="ListModel" Object="{null}"/>
<Command Name="EditPrimaryLabel" Command="{null}"/>
</Properties>
<Scripts>
<Script>
[InitialEvaluate(true)]
[DeclareTrigger(SelectionManager.SelectedIndices)]
if (SelectionManager != null &amp;&amp; Index != null)
{
Selected = SelectionManager.IsSelected([Index.Value]);
}
</Script>
</Scripts>
</Class>
<Class Name="CommandButtonProvider" Base="me:ModelButtonProvider">
<Properties>
<iris:Command Name="Model" Command="{null}"/>
</Properties>
<Scripts>
<Script>if (Model != null) PrimaryLabel = [Model.Description];</Script>
<Script>if (Model != null) ToolTip = [Model.Description];</Script>
<Script>if (Model != null) Available = [Model.Available];</Script>
<Script>if (Model != null) Selected = [Model.Selected];</Script>
<Script>if (Model != null) ClickCommand = [Model];</Script>
</Scripts>
</Class>
<UI Name="ButtonBase">
<Properties>
<Boolean Name="KeyInteractiveNStuff" Boolean="true"/>
<me:ButtonProvider Name="Provider" ButtonProvider="{null}"/>
<Boolean Name="ToolTipEnabled" Boolean="false"/>
<String Name="AccessibleDescription" String="{null}"/>
<Boolean Name="KeyFocusOnMouseDown" Boolean="true"/>
<Boolean Name="AllowDoubleClicks" Boolean="true"/>
<InputHandlerTransition Name="HandlerTransition" InputHandlerTransition="Up"/>
</Properties>
<Locals>
<Accessible Name="Accessible"/>
<tooltip:ToolTip Name="ToolTip" ToolTip="{null}"/>
</Locals>
<Input>
<ClickHandler Name="Focuser" ClickType="LeftMouse,RightMouse" HandlerTransition="Down"
HandlerStage="Routed,Direct" Repeat="false" Handle="false"/>
<ClickHandler Name="Clicker" ClickType="LeftMouse, Key" HandlerStage="Direct, Bubbled"
HandlerTransition="{HandlerTransition}" Handle="false"/>
</Input>
<Scripts>
<Script> UI.AllowDoubleClicks = AllowDoubleClicks; </Script>
<Script>
if (![KeyInteractiveNStuff])
{
Clicker.ClickType = ClickType.LeftMouse;
}
</Script>
<Script>
if (Provider != null)
{
Clicker.Command = [Provider.ClickCommand];
Clicker.Handle = (Clicker.Command != null);
}
</Script>
<Script>
if (Provider != null)
{
UI.Enabled = [Provider.Available];
}
</Script>
<Script>
if ([Accessible.Enabled])
{
if (AccessibleDescription != null)
{
Accessible.Name = [AccessibleDescription];
}
else if (Provider != null)
{
Accessible.Name = [Provider.PrimaryLabel];
}
else
{
Accessible.Name = null;
}
if (Provider != null)
{
Accessible.DefaultAction = "Press";
Accessible.DefaultActionCommand = [Provider.ClickCommand];
}
Accessible.IsPressed = [Clicker.Clicking];
Accessible.Role = AccessibleRole.PushButton;
}
</Script>
<Script>
[DeclareTrigger(UI.DeepMouseFocus)]
if (ToolTip != null)
{
UI.DisposeOwnedObject(ToolTip);
ToolTip = null;
}
if (UI.DeepMouseFocus)
{
if (ToolTipEnabled &amp;&amp; Provider != null)
{
string tooltipText = Provider.ToolTip;
if (!String.IsNullOrEmpty(tooltipText))
{
ToolTip = new tooltip:ToolTip();
ToolTip.Model = tooltipText;
ToolTip.Helper.ShowToolTip(ToolTip);
}
}
}
</Script>
<Script>
UI.KeyFocusOnMouseDown = [KeyFocusOnMouseDown];
</Script>
<Script>
[DeclareTrigger(Focuser.Invoked)]
if (!UI.DeepKeyFocus &amp;&amp; UI.KeyFocusOnMouseDown)
UI.NavigateInto();
</Script>
</Scripts>
</UI>
<UI Name="IconButton" Base="me:ButtonBase">
<Properties>
<iris:Command Name="Model" Command="$Required"/>
<me:CommandButtonProvider Name="Provider"/>
<Size Name="TileMinSize" Size="0,0"/>
<Size Name="TileMaxSize" Size="0,0"/>
<Inset Name="TilePadding" Inset="0,0,0,0"/>
<StretchingPolicy Name="StretchingPolicy" StretchingPolicy="None"/>
<Image Name="DisabledImage" Image="{null}"/>
<Image Name="Image" Image="{null}"/>
<Image Name="HoverImage" Image="{null}"/>
<Image Name="FocusImage" Image="{null}"/>
<Image Name="PressedImage" Image="{null}"/>
<StripAlignment Name="VerticalAlignment" StripAlignment="Near"/>
<StripAlignment Name="HorizontalAlignment" StripAlignment="Near"/>
<Boolean Name="ToolTipEnabled" Boolean="True"/>
</Properties>
<Scripts>
<Script>Provider.Model = [Model];</Script>
<Script>
<![CDATA[
if (![UI.FullyEnabled] && [DisabledImage] != null)
{
Background.Content = DisabledImage;
}
else
{
if ([Clicker.Clicking] && [PressedImage] != null)
{
Background.Content = PressedImage;
}
else if ([UI.DeepMouseFocus] && [HoverImage] != null)
{
Background.Content = HoverImage;
}
else if ([UI.DeepKeyFocus] && [FocusImage] != null)
{
Background.Content = FocusImage;
}
else
{
Background.Content = [Image];
}
}
]]>
</Script>
</Scripts>
<Content>
<Panel Padding="{TilePadding}">
<Children>
<Graphic Name="Background"
MinimumSize="{TileMinSize}"
MaximumSize="{TileMaxSize}"
VerticalAlignment="{VerticalAlignment}"
HorizontalAlignment="{HorizontalAlignment}"
StretchingPolicy="{StretchingPolicy}"/>
</Children>
</Panel>
</Content>
</UI>
<UI Name="PressAndHoldIconButton" Base="me:ButtonBase">
<Properties>
<iris:Command Name="ClickCommand" Command="$Required"/>
<iris:BooleanChoice Name="Holding" BooleanChoice="$Required"/>
<me:CommandButtonProvider Name="Provider"/>
<Size Name="TileMinSize" Size="0,0"/>
<Size Name="TileMaxSize" Size="0,0"/>
<Inset Name="TilePadding" Inset="0,0,0,0"/>
<StretchingPolicy Name="StretchingPolicy" StretchingPolicy="None"/>
<Image Name="DisabledImage" Image="{null}"/>
<Image Name="Image" Image="{null}"/>
<Image Name="HoverImage" Image="{null}"/>
<Image Name="FocusImage" Image="{null}"/>
<Image Name="PressedImage" Image="{null}"/>
<Image Name="HoldingImage" Image="{null}"/>
<Int32 Name="TimerInterval" Int32="1000"/>
<StripAlignment Name="VerticalAlignment" StripAlignment="Near"/>
<StripAlignment Name="HorizontalAlignment" StripAlignment="Near"/>
<Boolean Name="AllowDoubleClicks" Boolean="true"/>
</Properties>
<Locals>
<iris:Command Name="WorkerCommand"/>
<Timer Name="Timer" Interval="{TimerInterval}" Enabled="false" AutoRepeat="false"/>
<Boolean Name="TimerFired"/>
</Locals>
<Scripts>
<Script>
Provider.Model = WorkerCommand;
ToolTipEnabled = true;
UI.AllowDoubleClicks = AllowDoubleClicks;
</Script>
<Script>
WorkerCommand.Available = [ClickCommand.Available];
WorkerCommand.Description = [ClickCommand.Description];
</Script>
<Script>
[InitialEvaluate(false)]
if ( [Clicker.Clicking] )
{
if (Holding.Value)
{
TimerFired = true;
}
else
{
Timer.Enabled = true;
TimerFired = false;
}
}
else
{
Timer.Enabled = false;
Holding.Value = false;
}
</Script>
<Script>
[DeclareTrigger(WorkerCommand.Invoked)]
if (TimerFired == false)
{
ClickCommand.Invoke();
}
</Script>
<Script>
[DeclareTrigger(Timer.Tick)]
TimerFired = true;
if (Clicker.Clicking)
{
Holding.Value = true;
}
</Script>
<Script>
<![CDATA[
if (![UI.FullyEnabled] && [DisabledImage] != null)
{
Background.Content = DisabledImage;
}
else
{
if ([Holding.Value] && [HoldingImage] != null)
{
Background.Content = HoldingImage;
}
else if ([Clicker.Clicking] && [PressedImage] != null)
{
Background.Content = PressedImage;
}
else if ([UI.DeepMouseFocus] && [HoverImage] != null)
{
Background.Content = HoverImage;
}
else if ([UI.DeepKeyFocus] && [FocusImage] != null)
{
Background.Content = FocusImage;
}
else
{
Background.Content = [Image];
}
}
]]>
</Script>
</Scripts>
<Content>
<Panel Padding="{TilePadding}">
<Children>
<Graphic Name="Background"
MinimumSize="{TileMinSize}"
MaximumSize="{TileMaxSize}"
VerticalAlignment="{VerticalAlignment}"
HorizontalAlignment="{HorizontalAlignment}"
StretchingPolicy="{StretchingPolicy}"/>
</Children>
</Panel>
</Content>
</UI>
<UI Name="LabelButtonBase" Base="me:ButtonBase">
<Properties>
<style:Style Name="OverrideStyle" Style="{null}"/>
<style:Style Name="BaseStyle" Style="{styles:SharedStyles.ButtonStyle}"/>
<col:IDictionary Name="NamedStyles" IDictionary="{null}"/>
<Boolean Name="ShowToolTipWhenClipped" Boolean="true"/>
<Boolean Name="AlwaysShowToolTip" Boolean="false"/>
<PlacementMode Name="ToolTipPlacement" PlacementMode="Origin"/>
</Properties>
<Locals>
<style:StatefulCompositeStyle Name="Style" Base="{BaseStyle}"/>
</Locals>
<Scripts>
<Script>Style.Override = [OverrideStyle];</Script>
<Script>Style.State.Focused = [UI.DeepKeyFocus];</Script>
<Script>Style.State.Hovered = [UI.DeepMouseFocus];</Script>
<Script>
if (Provider != null)
{
Label.Content = [Provider.PrimaryLabel];
Label.ToolTipContent = [Provider.ToolTip];
}
</Script>
<Script>
if (Provider != null)
{
Style.State.Selected = [Provider.Selected];
}
</Script>
<Script>Style.State.Disabled = ![UI.FullyEnabled];</Script>
</Scripts>
<Content>
<me:Label Name="Label"
Style="{Style}" NamedStyles="{NamedStyles}"
ShowToolTipWhenClipped="{ShowToolTipWhenClipped}"
AlwaysShowToolTip="{AlwaysShowToolTip}"
ToolTipPlacement="{ToolTipPlacement}"/>
</Content>
</UI>
<UI Name="LabelButtonWithBackground" Base="me:LabelButtonBase">
<Properties>
<Color Name="BackgroundColor" Color="Transparent"/>
<Color Name="BackgroundFocusColor" Color="Transparent"/>
<Inset Name="LabelMargins" Inset="0,0,0,0"/>
<Size Name="TileMinSize" Size="0,0"/>
<Size Name="TileMaxSize" Size="0,0"/>
</Properties>
<Scripts>
<Script>
if ([Style.State.Hovered])
{
Background.Content = BackgroundFocusColor;
}
else
{
Background.Content = BackgroundColor;
}
</Script>
</Scripts>
<Content>
<ColorFill Name="Background"
MinimumSize="{TileMinSize}" MaximumSize="{TileMaxSize}">
<Children>
<me:Label Name="Label" Style="{Style}" NamedStyles="{NamedStyles}"
ShowToolTipWhenClipped="{ShowToolTipWhenClipped}"
AlwaysShowToolTip="{AlwaysShowToolTip}"
ToolTipPlacement="{ToolTipPlacement}"
Margins="{LabelMargins}"/>
</Children>
</ColorFill>
</Content>
</UI>
<UI Name="Button" Base="me:LabelButtonWithBackground">
<Properties>
<iris:Command Name="Model" Command="{null}"/>
<me:CommandButtonProvider Name="Provider"/>
</Properties>
<Scripts>
<Script>Provider.Model = [Model];</Script>
</Scripts>
</UI>
<UI Name="Label">
<Properties>
<style:Style Name="Style" Style="{styles:SharedStyles.LabelStyle}"/>
<String Name="Content"/>
<String Name="ToolTipContent"/>
<Boolean Name="WordWrap" Boolean="false"/>
<Int32 Name="MaximumLines" Int32="0"/>
<HorizontalAlignment Name="Alignment" HorizontalAlignment="Near"/>
<col:IDictionary Name="NamedStyles" IDictionary="{null}"/>
<Boolean Name="ShowToolTipWhenClipped" Boolean="true"/>
<Boolean Name="AlwaysShowToolTip" Boolean="false"/>
<PlacementMode Name="ToolTipPlacement" PlacementMode="Origin"/>
<Boolean Name="Clipped"/>
<String Name="AccessibleDescription" String="{null}"/>
<AccessibleRole Name="AccessibleRole" AccessibleRole="StaticText"/>
</Properties>
<Locals>
<Accessible Name="Accessible"/>
<tooltip:ToolTip Name="ToolTip" ToolTip="{null}"/>
</Locals>
<Scripts>
<Script>Label.Content = [Content];</Script>
<Script>Label.WordWrap = [WordWrap];</Script>
<Script>Label.MaximumLines = [MaximumLines];</Script>
<Script>Label.Color = [Style.Color];</Script>
<Script>Label.Font = [Style.Font];</Script>
<Script>Label.Style = [Style.TextStyle];</Script>
<Script>Label.Margins = [Style.TextMargins];</Script>
<Script>Label.HorizontalAlignment = [Alignment];</Script>
<Script>Label.NamedStyles = [NamedStyles];</Script>
<Script>Clipped = [Label.Clipped];</Script>
<Script>
if ([Accessible.Enabled])
{
if (AccessibleDescription != null)
{
Accessible.Name = AccessibleDescription;
}
else
{
Accessible.Name = [Label.Content];
}
Accessible.Role = AccessibleRole;
}
</Script>
<Script><![CDATA[
[DeclareTrigger(UI.DeepMouseFocus)]
if (ToolTip != null)
{
UI.DisposeOwnedObject(ToolTip);
ToolTip = null;
}
if (UI.DeepMouseFocus && (AlwaysShowToolTip || (ShowToolTipWhenClipped && Clipped)))
{
string display = null;
if (!String.IsNullOrEmpty(ToolTipContent))
{
display = ToolTipContent;
}
else
{
display = Content;
}
if (!String.IsNullOrEmpty(display))
{
ToolTip = new tooltip:ToolTip();
PopupLayoutInput input = new PopupLayoutInput();
input.Placement = ToolTipPlacement;
input.PlacementTarget = Label;
input.Offset = tooltip:ToolTipConstants.InversePadding;
ToolTip.LayoutInput = input;
ToolTip.Model = display;
ToolTip.Font = Label.Font;
ToolTip.Helper.ShowToolTip(ToolTip);
}
}
]]></Script>
</Scripts>
<Content>
<Text Name="Label" NamedStyles="{NamedStyles}" MouseInteractive="{ShowToolTipWhenClipped}"/>
</Content>
</UI>
<UI Name="AnimatedLabel" Base="me:Label">
<Properties>
<Animation Name="ContentChangeAnim" Animation="{animations:Animations.TitleContentChange}" />
<Animation Name="ShowAnim" Animation="{animations:Animations.TitleShow}" />
</Properties>
<Content>
<Text Name="Label">
<Animations>
<Animation Animation="{ContentChangeAnim}" />
<Animation Animation="{ShowAnim}" />
</Animations>
</Text>
</Content>
</UI>
<UI Name="ButtonWithIcon" Base="me:Button">
<Properties>
<me:Icon Name="Icon"/>
</Properties>
<Scripts>
<Script>
Label.RequestSource(typeof(me:LabelAndIconContent), "Icon", Icon);
</Script>
</Scripts>
</UI>
<UI Name="ActionButtonWithIcon" Base="me:BigActionButton">
<Properties>
<me:Icon Name="Icon"/>
</Properties>
</UI>
<Class Name="Icon">
<Properties>
<Image Name="Image" Image="res://ZuneShellResources!Arrow.More.png"/>
<Inset Name="Margins" Inset="4,0,0,0"/>
<Boolean Name="Visible" Boolean="true"/>
</Properties>
</Class>
<UI Name="LabelAndIconContent" Base="me:Label">
<Properties>
<me:Icon Name="Icon" Icon="{null}"/>
</Properties>
<Scripts>
<Script>IconGraphic.Content = [Icon.Image];</Script>
<Script>IconGraphic.Margins = [Icon.Margins];</Script>
<Script>IconGraphic.Visible = [Icon.Visible];</Script>
</Scripts>
<Content>
<Panel>
<Layout>
<FlowLayout Orientation="Horizontal" ItemAlignment="Center"/>
</Layout>
<Children>
<Text Name="Label" MouseInteractive="{ShowToolTipWhenClipped}"/>
<Graphic Name="IconGraphic"/>
</Children>
</Panel>
</Content>
</UI>
<UI Name="ToggleIconButton">
<Properties>
<iris:BooleanChoice Name="Model" BooleanChoice="$Required"/>
<Image Name="OnImage" Image="{null}"/>
<Image Name="OffImage" Image="{null}"/>
<Image Name="OnHoverImage" Image="{null}"/>
<Image Name="OffHoverImage" Image="{null}"/>
<Image Name="OnFocusImage" Image="{null}"/>
<Image Name="OffFocusImage" Image="{null}"/>
<Image Name="OnPressedImage" Image="{null}"/>
<Image Name="OffPressedImage" Image="{null}"/>
<Image Name="OnDisabledImage" Image="{null}"/>
<Image Name="OffDisabledImage" Image="{null}"/>
<sys:Boolean Name="KeyInteractiveNStuff" Boolean="true"/>
<String Name="Description" String="{null}"/>
<Boolean Name="KeyFocusOnMouseDown" Boolean="true"/>
</Properties>
<Locals>
<iris:Command Name="Toggle"/>
</Locals>
<Scripts>
<Script>Toggle.Description = [Model.Description];</Script>
<Script>
[DeclareTrigger(Toggle.Invoked)]
Model.Value = !Model.Value;
</Script>
<Script>
if ([Model.Value])
{
Button.Image = [OnImage];
Button.FocusImage = [OnFocusImage];
Button.HoverImage = [OnHoverImage];
Button.PressedImage = [OnPressedImage];
Button.DisabledImage = [OnDisabledImage];
}
else
{
Button.Image = [OffImage];
Button.FocusImage = [OffFocusImage];
Button.HoverImage = [OffHoverImage];
Button.PressedImage = [OffPressedImage];
Button.DisabledImage = [OnDisabledImage];
}
</Script>
<Script>
Button.KeyFocusOnMouseDown = [KeyFocusOnMouseDown];
</Script>
</Scripts>
<Content>
<me:IconButton Name="Button" Model="{Toggle}"
KeyFocusOnMouseDown="{KeyFocusOnMouseDown}"
Image="{OffImage}" FocusImage="{OffFocusImage}"
HoverImage="{OffHoverImage}" PressedImage="{OffPressedImage}"
KeyInteractiveNStuff="{KeyInteractiveNStuff}"/>
</Content>
</UI>
<UI Name="ToggleActionButton" Base="me:ActionButtonBase">
<Properties>
<iris:BooleanChoice Name="Model" BooleanChoice="$Required"/>
<me:ToggleTextButtonProvider Name="Provider"/>
</Properties>
<Locals>
<iris:Command Name="Toggle"/>
</Locals>
<Scripts>
<Script>Toggle.Description = [Model.Description];</Script>
<Script>
[DeclareTrigger(Toggle.Invoked)]
Model.Value = !Model.Value;
</Script>
<Script>Provider.Label = (sys:String)[Model.Chosen];</Script>
<Script>Provider.Model = [Toggle];</Script>
</Scripts>
</UI>
<Class Name="ToggleTextButtonProvider" Base="me:ModelButtonProvider">
<Properties>
<iris:Command Name="Model"/>
<String Name="Label" String="{null}"/>
</Properties>
<Scripts>
<Script>if (Model != null) PrimaryLabel = [Label];</Script>
<Script>if (Model != null) ToolTip = [Model.Description];</Script>
<Script>if (Model != null) Available = [Model.Available];</Script>
<Script>if (Model != null) Selected = [Model.Selected];</Script>
<Script>if (Model != null) ClickCommand = [Model];</Script>
</Scripts>
</Class>
<UI Name="MenuButton" Base="me:Button">
<Properties>
<style:StyleSet Name="OverrideStyle">
<Focused>
<style:Style Color="White"/>
</Focused>
<Default>
<style:Style Color="{styles:Styles.TextActive}"/>
</Default>
</style:StyleSet>
<Inset Name="TextMargins" Inset="3,0,3,2"/>
<Size Name="TileMinSize" Size="175,0"/>
<Color Name="BackgroundFocusColor" Color="{styles:Styles.TextSelected}"/>
</Properties>
</UI>
<UI Name="InputButton" Base="me:Button">
<Properties>
<style:Style Name="OverrideStyle" Color="{styles:Styles.TextFocusedForeground}"/>
<Color Name="BackgroundColor" Color="{styles:Styles.TextActive}"/>
<Color Name="BackgroundFocusColor" Color="{styles:Styles.TextSelected}"/>
</Properties>
</UI>
<UI Name="ActionButtonBase" Base="me:LabelButtonBase">
<Properties>
<Size Name="TileMinSize" Size="75,0"/>
<Size Name="TileMaxSize" Size="0,0"/>
<Image Name="Image" Image="{styles:Styles.Button}"/>
<Image Name="HoverImage" Image="{styles:Styles.ButtonHover}"/>
<Image Name="FocusImage" Image="{HoverImage}"/>
<Image Name="PressedImage" Image="{styles:Styles.ButtonPressed}"/>
<Image Name="DisabledImage" Image="{styles:Styles.ButtonDisabled}"/>
<style:Style Name="BaseStyle" Style="{styles:SharedStyles.ActionButtonStyle}"/>
<style:Style Name="ShadowStyle" Style="{styles:SharedStyles.ActionButtonShadowStyle}"/>
<Inset Name="ButtonInset" Inset="10,4,9,0"/>
<Size Name="FixedHeight" Size="0,21"/>
<Boolean Name="ShowShadowLabel" Boolean="true"/>
<me:Icon Name="Icon" Icon="{null}"/>
</Properties>
<Scripts>
<Script>
<![CDATA[
if (![UI.FullyEnabled] && [DisabledImage] != null)
{
Background.Content = DisabledImage;
}
else
{
if ([Clicker.Clicking] && [PressedImage] != null)
{
Background.Content = PressedImage;
}
else if ([UI.DeepMouseFocus] && [HoverImage] != null)
{
Background.Content = HoverImage;
}
else if ([UI.DeepKeyFocus] && [FocusImage] != null)
{
Background.Content = FocusImage;
}
else
{
Background.Content = [Image];
}
}
]]>
</Script>
<Script>
ShadowLabel.Visible = [ShowShadowLabel];
</Script>
<Script>
ShadowLabel.Content = [Label.Content];
</Script>
<Script>if (Icon != null) IconGraphic.Content = [Icon.Image];</Script>
<Script>if (Icon != null) IconGraphic.Margins = [Icon.Margins];</Script>
<Script>if (Icon != null) IconGraphic.Visible = [Icon.Visible];</Script>
<Script>
int width = 1;
if (TileMinSize.Width > 0)
width = TileMinSize.Width;
int height = 1;
if (TileMinSize.Height > 0)
height = TileMinSize.Height;
WasteOfSpace.MaximumSize = new Size(width, height);
</Script>
</Scripts>
<Content>
<Graphic Name="Background" StretchingPolicy="Fill" SizingPolicy="SizeToChildren" MinimumSize="{FixedHeight}" MaximumSize="{FixedHeight}" Layout="Anchor">
<Children>
<Panel Name="LabelPanel" MaximumSize="{TileMaxSize}" Padding="{ButtonInset}">
<LayoutInput>
<AnchorLayoutInput Top="Parent,0"/>
</LayoutInput>
<Layout>
<FlowLayout Orientation="Horizontal" ItemAlignment="Center"/>
</Layout>
<Children>
<Panel>
<Children>
<me:Label Name="Label" Style="{Style}"/>
<me:Label Name="ShadowLabel" Style="{ShadowStyle}" Margins="1,1,0,0"/>
</Children>
</Panel>
<Graphic Name="IconGraphic"/>
</Children>
</Panel>
<Panel Name="WasteOfSpace" Layout="Fill">
<LayoutInput>
<AnchorLayoutInput Top="Parent,0"/>
</LayoutInput>
</Panel>
</Children>
</Graphic>
</Content>
</UI>
<UI Name="ActionButton" Base="me:ActionButtonBase">
<Properties>
<iris:Command Name="Model" Command="{null}"/>
<me:CommandButtonProvider Name="Provider"/>
</Properties>
<Scripts>
<Script>Provider.Model = [Model];</Script>
</Scripts>
</UI>
<UI Name="BigActionButton" Base="me:ActionButton">
<Properties>
<Image Name="Image" Image="{styles:Styles.BigButton}"/>
<Image Name="HoverImage" Image="{styles:Styles.BigButtonHover}"/>
<Image Name="FocusImage" Image="{HoverImage}"/>
<Image Name="PressedImage" Image="{styles:Styles.BigButtonPressed}"/>
<Image Name="DisabledImage" Image="{styles:Styles.BigButtonDisabled}"/>
<style:Style Name="BaseStyle" Style="{styles:SharedStyles.BigActionButtonStyle}"/>
<style:Style Name="ShadowStyle" Style="{styles:SharedStyles.BigActionButtonShadowStyle}"/>
<Inset Name="ButtonInset" Inset="12,4,11,0"/>
<Size Name="FixedHeight" Size="0,25"/>
</Properties>
</UI>
</UIX>