{"action":"closed","issue":{"url":"https://api.github.com/repos/mono/xwt/issues/418","labels_url":"https://api.github.com/repos/mono/xwt/issues/418/labels{/name}","comments_url":"https://api.github.com/repos/mono/xwt/issues/418/comments","events_url":"https://api.github.com/repos/mono/xwt/issues/418/events","html_url":"https://github.com/mono/xwt/issues/418","id":51930808,"number":418,"title":"[WPF] Inproper right and bottom margins (or width and height)","user":{"login":"rpc-scandinavia","id":10145161,"avatar_url":"https://avatars.githubusercontent.com/u/10145161?v=3","gravatar_id":"","url":"https://api.github.com/users/rpc-scandinavia","html_url":"https://github.com/rpc-scandinavia","followers_url":"https://api.github.com/users/rpc-scandinavia/followers","following_url":"https://api.github.com/users/rpc-scandinavia/following{/other_user}","gists_url":"https://api.github.com/users/rpc-scandinavia/gists{/gist_id}","starred_url":"https://api.github.com/users/rpc-scandinavia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpc-scandinavia/subscriptions","organizations_url":"https://api.github.com/users/rpc-scandinavia/orgs","repos_url":"https://api.github.com/users/rpc-scandinavia/repos","events_url":"https://api.github.com/users/rpc-scandinavia/events{/privacy}","received_events_url":"https://api.github.com/users/rpc-scandinavia/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mono/xwt/labels/WPF","name":"WPF","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-12-14T20:36:22Z","updated_at":"2015-01-19T18:45:00Z","closed_at":"2015-01-19T18:45:00Z","body":"I am trying to make a splash window.\r\nI use a Canvas with a ImageView as the background, and a VBox for content.\r\nOn that VBox I add another Canvas and two other VBoxes for labels and stuff.\r\nThe Canvas and two VBoxes have a margin of 10, but the result is not as expected, insted the entire widget is moved 10 pixels to the right and down - in my case cropped by the window.\r\n\r\nIn \"Xwt.WpfBackend\\WidgetBackend.cs\" method \"MeasureOverride\" I have disabled this code from line 335:\r\n\r\n\t\t\t\t\t// Calculate the preferred width through the frontend if there is an overriden OnGetPreferredWidth, but only do it\r\n\t\t\t\t\t// if we are not given a constraint. If there is a width constraint, we'll use that constraint value for calculating the height\r\n\t\t\t\t\t//var cw = double.IsPositiveInfinity (constraint.Width) ? SizeConstraint.Unconstrained : constraint.Width;\r\n\t\t\t\t\t//var ch = double.IsPositiveInfinity (constraint.Height) ? SizeConstraint.Unconstrained : constraint.Height;\r\n\t\t\t\t\t//var ws = eventSink.GetPreferredSize (cw, ch);\r\n\t\t\t\t\t//wpfMeasure = new System.Windows.Size (ws.Width, ws.Height);\r\n\r\nThen everything works with WPF.\r\nAt this point I don't have the knowledge about XWT to figure out what is going wrong.\r\nI don't know which \"IWidgetEventSink\" class is called by the \"eventSink.GetPreferredSize method.\r\n\r\nI don't know if it makes any difference, I am compiling/building everything in Debian Linux using MonoDevelop.\r\n\r\nEverything works in GTK."}}