wpf自定义窗口,如何进行修改以使其显示图标 [英] wpf custome window,how to modify in order to enable it show icon

查看:172
本文介绍了wpf自定义窗口,如何进行修改以使其显示图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到wpf中有一个自定义窗口, http://wpfwindow.codeplex.com / [^ ]

并且我想向其中添加图标,就像wpf窗口一样,我想启用它,将其设置为代码隐藏在xaml或xaml中.我尝试过,但是我始终无法以任何一种方式获取图标.我在自定义窗口InitlizeControl方法中修改了部分代码,并尝试从该方法中的绝对路径显示图标,并且它起作用了.但是我无法设置像wpf样式这样的图标(后面的代码和XAML).

我想要这样:

在代码中;

I saw there is a custome window in wpf, http://wpfwindow.codeplex.com/[^]

and I want to add icon to it, just like wpf window, I want to enable it set icon codebehind or in xaml. i tried , but I always not able to get icon in either way. I modified part of code in custome window InitlizeControl method, and tried to show icon from absolute path within the method and it worked. but I did not able to set icon like wpf style (code behind and XAML).

i want it like that:

in code;

Standardwindow m_window ;
m_window.icon = myicon.


或xaml


or in xaml

icon = "path//............"


有谁告诉我该怎么做.


is there anyone to tell me how to do it.
thanks in advance!

推荐答案

在浏览CodePlex组件站点时,我无法使用iCon找出窗口.我的猜测是,此自定义窗口可能会抑制iCon功能.但不确定.

进行此查询的最佳位置: http://wpfwindow.codeplex.com/discussions [
On browsing through CodePlex component site, I couldn''t figure out window with iCon. My guess is that this custom defined window might suppressed iCon functionality; but not sure.

Best place to put this query at: http://wpfwindow.codeplex.com/discussions[^]


这篇关于wpf自定义窗口,如何进行修改以使其显示图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆