//EndDrag="{Background=Jet}";
}
DockWindow {
+ Background = "Onyx";
Focusable = "true";
AllowDrag = "true";
Margin="0";
ctxMenuContainer = Load ("#Crow.ContextMenu.template") as MenuItem;
}
+ void CtxMenuContainer_LayoutChanged (object sender, LayoutingEventArgs e)
+ {
+ Rectangle r = ctxMenuContainer.ScreenCoordinates (ctxMenuContainer.Slot);
+ if (e.LayoutType == LayoutingType.Width) {
+ if (r.Right > this.clientRectangle.Right)
+ ctxMenuContainer.Left = this.clientRectangle.Right - ctxMenuContainer.Slot.Width;
+ }else if (e.LayoutType == LayoutingType.Width) {
+ if (r.Bottom > this.clientRectangle.Bottom)
+ ctxMenuContainer.Top = this.clientRectangle.Bottom - ctxMenuContainer.Slot.Height;
+ }
+
+ }
+
public void ShowContextMenu (GraphicObject go) {
lock (UpdateMutex) {
{
public int Line;
public int Column;
+ public string Source;
public ParserException(int line, int column, string txt, string source = null)
- : base(string.Format("{3}:({0},{1}): {2}", line, column, txt, source))
+ : base(txt)
{
Line = line;
Column = column;
+ Source = source;
}
public ParserException(int line, int column, string txt, Exception innerException, string source = null)
- : base(string.Format("{3}:({0},{1}): {2}", line, column, txt, source), innerException)
- {}
+ : base(txt, innerException)
+ {
+ Line = line;
+ Column = column;
+ Source = source;
+ }
+ public override string ToString ()
+ {
+ return string.Format("{3}:({0},{1}): {2}", Line, Column, Message, Source);
+ }
}
}
sharedResources [path] = new sharedPicture (hSVG, Dimensions);
}
+ public void LoadSvgFragment (string fragment) {
+ hSVG = new Rsvg.Handle (System.Text.Encoding.Unicode.GetBytes(fragment));
+ Dimensions = new Size (hSVG.Dimensions.Width, hSVG.Dimensions.Height);
+ }
+
#region implemented abstract members of Fill
public override void SetAsSource (Context ctx, Rectangle bounds = default(Rectangle))
/// <param name="subPart">limit rendering to svg part named 'subPart'</param>
public override void Paint (Context gr, Rectangle rect, string subPart = "")
{
+ if (hSVG == null)
+ return;
float widthRatio = 1f;
float heightRatio = 1f;