Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
935
XamDockManager floating window icon
posted

I am currently getting the default icon for the floating windows (including icon in the windows start menu). Is there a way to set the icon for the floating windows in SplitPane or ContentPane.

Parents
No Data
Reply
  • 54937
    Offline posted

    There is no property exposed on the ToolWindow for the Icon. The Icon would only be displayed if the ShowInTaskBar is true and since it is not set then it will just pick up the application's Icon by default. Note you might not see that when debugging because the application Icon isn't shown when the debugger is attached. If you really need to set it specifically on the toolwindows then you will need to hook the ToolWindowLoaded event. The associated Window won't necessarily be available then so you'll likely need to hook the Loaded event of the e.Window and then in that handler get the window (e.g. using Window.GetWindow) and set the Icon there. e.g.

    private void OnToolWindowLoaded(object sender, PaneToolWindowEventArgs e)
    {
      e.Window.Loaded += (o,a) =>
      {
        var w = Window.GetWindow( o as DependencyObject );
        //w.Icon = ...
      };
    }

Children
No Data