<EmbeddedResource Include="Templates\DockWindow.template">
<LogicalName>Crow.DockWindow.template</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="Templates\HScrollBar.template">
+ <LogicalName>Crow.HScrollBar.template</LogicalName>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Crow.dll.config">
Maximum = "0";
Value = "0";
}
+HScrollBar {
+ Template = "#Crow.HScrollBar.template";
+ Maximum = "0";
+ Value = "0";
+}
Scroller {
CacheEnabled = "false";
}
MouseUp="{Background=hgradient|0:Gray|1:Jet}";
MouseEnter="{Foreground=Black}";
MouseLeave="{Foreground=Jet}";
+}
+HArrowBut {
+ MouseRepeat="true";
+ Height="Fit";
+ Width="Fit";
+ Focusable="true";
+ Foreground="Jet";
+ Background="vgradient|0:Gray|1:Jet";
+ MouseDown="{Background=vgradient|0:White|0.4:BlueCrayola|1:Jet}";
+ MouseUp="{Background=vgradient|0:Gray|1:Jet}";
+ MouseEnter="{Foreground=Black}";
+ MouseLeave="{Foreground=Jet}";
}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="Jet">
+ <GenericStack Orientation="{./Orientation}" Spacing="0">
+ <Shape Style="HArrowBut" MouseDown="./onScrollBack" Path="M 0.5,5.5 L 10.5,0.5 L 10.5,10.5 Z"/>
+ <Slider Name="Slider"
+ Orientation="{./Orientation}"
+ Value="{²./Value}"
+ Maximum="{./Maximum}"
+ CursorSize="{./CursorSize}"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+ LargeIncrement="{./LargeIncrement}"
+ SmallIncrement="{./SmallIncrement}"
+ CursorColor="vgradient|0:Gray|1:Jet"
+ Foreground="Jet"
+ Background="vgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"/>
+ <Shape Style="HArrowBut" MouseDown="./onScrollForth" Path="M 0.5,0.5 L 10.5,5.5 L 0.5,10.5 Z"/>
+ </GenericStack>
+</Border>
\ No newline at end of file
void onCancel(object sender, MouseButtonEventArgs e){
IFace.DeleteWidget (this);
}
+
}
}
protected double unity;
#region Public properties
- [XmlAttributeAttribute()][DefaultValue("vgradient|0:White|0,1:LightGray|0,9:LightGray|1:DimGray")]
+ [DefaultValue("vgradient|0:White|0,1:LightGray|0,9:LightGray|1:DimGray")]
public virtual Fill CursorColor {
get { return _cursorColor; }
set {
NotifyValueChanged ("CursorColor", _cursorColor);
}
}
- [XmlAttributeAttribute()][DefaultValue(20)]
+ [DefaultValue(20)]
public virtual int CursorSize {
get { return _cursorSize; }
set {
NotifyValueChanged ("CursorSize", _cursorSize);
}
}
- [XmlAttributeAttribute()][DefaultValue(Orientation.Horizontal)]
+ [DefaultValue(Orientation.Horizontal)]
public virtual Orientation Orientation
{
get { return _orientation; }
}
#endregion
- [XmlAttributeAttribute()][DefaultValue(10.0)]
+ [DefaultValue(10.0)]
public override double Maximum {
get { return base.Maximum; }
set {
MenuItem ctxMenuContainer;
protected void initContextMenus (){
ctxMenuContainer = Load ("#Crow.ContextMenu.template") as MenuItem;
+ ctxMenuContainer.LayoutChanged += CtxMenuContainer_LayoutChanged;
}
void CtxMenuContainer_LayoutChanged (object sender, LayoutingEventArgs e)
{
Rectangle r = ctxMenuContainer.ScreenCoordinates (ctxMenuContainer.Slot);
- if (e.LayoutType == LayoutingType.Width) {
+ if (e.LayoutType == LayoutingType.Width || e.LayoutType == LayoutingType.X) {
if (r.Right > this.clientRectangle.Right)
ctxMenuContainer.Left = this.clientRectangle.Right - ctxMenuContainer.Slot.Width;
- }else if (e.LayoutType == LayoutingType.Width) {
+ }else if (e.LayoutType == LayoutingType.Width || e.LayoutType == LayoutingType.Y) {
if (r.Bottom > this.clientRectangle.Bottom)
ctxMenuContainer.Top = this.clientRectangle.Bottom - ctxMenuContainer.Slot.Height;
}