{"id":427,"date":"2015-04-09T11:41:16","date_gmt":"2015-04-09T09:41:16","guid":{"rendered":"http:\/\/floris.briolas.nl\/floris\/?p=427"},"modified":"2015-06-02T10:33:00","modified_gmt":"2015-06-02T08:33:00","slug":"first-pull-request-created","status":"publish","type":"post","link":"https:\/\/floris.briolas.nl\/floris\/2015\/04\/first-pull-request-created\/","title":{"rendered":"First Pull-request created."},"content":{"rendered":"<h1>Well, it had to happen some day.<\/h1>\n<p>I&#8217;ve found an issue in a <a href=\"https:\/\/github.com\/fluentribbon\/Fluent.Ribbon\">project <\/a>we are using @ work. I&#8217;ve created a fix and I\u00a0want to share it!.<\/p>\n<p>So this project is hosted on github, and it is indeed simple to add fixes.<\/p>\n<p>Just follow these steps :<\/p>\n<ol>\n<li>Fork the project<\/li>\n<li>Create a feature \/ fix branch<\/li>\n<li>Apply fix.<\/li>\n<li>Push to github.<\/li>\n<li>View this branch on github<\/li>\n<li>Push the &#8220;Create Pull Request&#8221; button<\/li>\n<\/ol>\n<p>It will then show you if it can be merged at all. Add some information and you are done!<\/p>\n<p><a href=\"https:\/\/help.github.com\/articles\/creating-a-pull-request\/\">better details<\/a><\/p>\n<h1>The fix.<\/h1>\n<p>I&#8217;ve created a rather simple fix. We are using the &#8220;Fluent.Ribbon&#8221; for a modern look and feel. But some of our controls are still winforms. There is nothing wrong with winforms, but a mixture of wpf and winforms is not always ideal.<\/p>\n<p>Anyway, we have a combobox in our ribbon and when a winforms control has focus and you try to open this combobox in your ribbon, it acts up. \u00a0repro :\u00a0<div class='w3eden'><!-- WPDM Link Template: Default Template -->\n\n<div class=\"link-template-default card mb-2\">\n    <div class=\"card-body\">\n        <div class=\"media\">\n            <div class=\"mr-3 img-48\"><img class=\"wpdm_icon\" alt=\"Icon\"   src=\"http:\/\/floris.briolas.nl\/floris\/wp-content\/plugins\/download-manager\/assets\/file-type-icons\/download4.png\" \/><\/div>\n            <div class=\"media-body\">\n                <h3 class=\"package-title\"><a href='https:\/\/floris.briolas.nl\/floris\/download\/fluent-ribbon-windowsformshost_issue\/'>Fluent.Ribbon WindowsFormsHost_Issue<\/a><\/h3>\n                <div class=\"text-muted text-small\"><i class=\"fas fa-copy\"><\/i> 1 file(s) <i class=\"fas fa-hdd ml-3\"><\/i> 72.47 KB<\/div>\n            <\/div>\n            <div class=\"ml-3\">\n                <a class='wpdm-download-link download-on-click btn btn-primary ' rel='nofollow' href='#' data-downloadurl=\"https:\/\/floris.briolas.nl\/floris\/download\/fluent-ribbon-windowsformshost_issue\/?wpdmdl=431&refresh=69e43d50426761776565584\">Download<\/a>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n<\/div><\/p>\n<p><a href=\"http:\/\/floris.briolas.nl\/floris\/wp-content\/uploads\/2015\/04\/MainWindow_2015-04-09_11-25-11.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-428 aligncenter\" src=\"http:\/\/floris.briolas.nl\/floris\/wp-content\/uploads\/2015\/04\/MainWindow_2015-04-09_11-25-11-600x338.png\" alt=\"MainWindow_2015-04-09_11-25-11\" width=\"600\" height=\"338\" srcset=\"https:\/\/floris.briolas.nl\/floris\/wp-content\/uploads\/2015\/04\/MainWindow_2015-04-09_11-25-11-600x338.png 600w, https:\/\/floris.briolas.nl\/floris\/wp-content\/uploads\/2015\/04\/MainWindow_2015-04-09_11-25-11.png 796w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>We have found this message in the debug window:<\/p>\n<p style=\"padding-left: 60px;\">System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=IsDropDownOpen; DataItem=&#8217;ComboBox&#8217; (Name=&#8217;StyleCbx&#8217;); target element is &#8216;ToggleButton&#8217; (Name=&#8217;ToggleButton&#8217;); target property is &#8216;IsChecked&#8217; (type &#8216;Nullable`1&#8242;) NullReferenceException:&#8217;System.NullReferenceException: Object reference not set to an instance of an object.<br \/>\nat Fluent.ComboBox.OnDropDownOpened(EventArgs e)<br \/>\nat System.Windows.Controls.ComboBox.OnIsDropDownOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br \/>\nat System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br \/>\nat System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br \/>\nat System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br \/>\nat System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry&amp; newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)<br \/>\nat System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)<br \/>\nat System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)<br \/>\nat MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)<br \/>\nat MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)<br \/>\nat System.Windows.Data.BindingExpression.UpdateSource(Object value)&#8217;<\/p>\n<p>Turns out that the fix was rather simple. The combobox of fluent expected the\u00a0<a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/system.windows.input.keyboard.focusedelement%28v=vs.110%29.aspx\">Keyboard.FocusedElement<\/a>, to always be non-null.<\/p>\n<p>Well this is not the case when dealing with a mixed technology window. So the fix was created and a pull request has been offered.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, it had to happen some day. I&#8217;ve found an issue in a project we are using @ work. I&#8217;ve created a fix and I\u00a0want to share it!. So this project is hosted on github, and it is indeed simple to add fixes. Just follow these steps : Fork the project Create a feature \/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[3,11],"tags":[20],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p61yPs-6T","_links":{"self":[{"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/posts\/427"}],"collection":[{"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/comments?post=427"}],"version-history":[{"count":1,"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/posts\/427\/revisions"}],"predecessor-version":[{"id":433,"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/posts\/427\/revisions\/433"}],"wp:attachment":[{"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/media?parent=427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/categories?post=427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/tags?post=427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}