㈠ C# WPF: 鍦ㄤ竴涓绐椾綋涓婅剧疆涓涓鎸夐挳锛岀偣鍑昏繖涓鎸夐挳镞讹纴镓揿紑鏂扮獥浣揿苟鍏抽棴铡熺獥浣掳纻
鐢℉ide銆傚傛灉鐢–olse镄勮瘽锛屼綘鏂扮獥浣撶殑璧勬簮涔熶细琚閲婃斁锛屼篃灏辨病浜嗐
㈡ wpf锛屾湁涓淇濆瓨button锛屾墽琛屽悗杈揿叆鏁版嵁淇濆瓨锛屽叧闂锛屽啀娆℃墽琛屽垯鏄剧ず鏄涓婃$殑鏁版嵁
棣栧厛闇瑕佹敞镒忕殑涓镣规槸 浣犳墍鎻忚堪镄勫叧闂鏄 鍏抽棴搴旂敤绋嫔簭杩樻槸鍙鍏抽棴瀵硅瘽妗嗐傚傛灉鍙鍏抽棴瀵硅瘽妗嗭纴闾d箞浣犲彧闇瑕佸湪钖庡彴瀹氢箟涓涓鏁版嵁闆嗗悎鎴栬呭彉閲忓幓瀛桦偍浣犻渶瑕佷缭瀛樼殑涓滆タ銆傛瘆濡备綘鍓嶅彴涓涓狣ataGrid锛屽畠镄処temSource缁戝畾钖庡彴涓涓鏁版嵁闆嗗悎銆备綘鍦ㄥ墠鍙板仛澧炲垹鏀癸纴鍏跺疄鏄瀵瑰悗鍙扮殑杩欎釜鏁版嵁闆嗗悎锅氭搷浣溿傚綋浣犲叧闂绐楀彛鍐嶆墦寮杩欎釜绐楀彛镄勮瘽锛娈ataGrid杩樻槸浼氭樉绀哄悗鍙扮殑杩欎釜ItemSource銆傚傛灉鍏抽棴镄勬槸搴旂敤绋嫔簭镄勮瘽锛岃繖灏辨秹鍙婂埌鏁版嵁镄勮诲啓镎崭綔銆备綘鍙鑳藉皢鏁版嵁淇濆瓨鍦ㄦ湰鍦扮殑镆愪釜鏂囦欢閲岋纸濡倄ml锛宼xt绛夛级涔熷彲鑳戒缭瀛桦湪鏁版嵁搴挞噷銆傝繖涓灏遍渶瑕佷綘鍦ㄥ悗鍙扮紪镰佺浉鍏崇殑璇诲啓镎崭綔绫汇傜绣涓婃湁寰埚氱浉鍏宠祫婧愶纴浣犲彲浠ユ悳绱涓嬨
㈢ WPF涓璘serControl鎺т欢镄勫叧闂
濡傛灉UserControl鏄钖锷ㄧ獥浣掳纴闾d箞鐩存帴 Application.Current.Shutdown();鍏抽棴绋嫔簭銆
濡傛灉浣滀负浣滀负鍏朵粬瀹瑰櫒鍐呯殑鎺т欢锛岄偅涔堥渶瑕佹垒鍒扮埗瀹瑰櫒锛岀劧钖庣Щ闄ゆゆ带浠躲备緥濡傜埗瀹瑰櫒鏄疓rid锛岄偅涔堥渶瑕丢rid.children,renmove(usercontrol)銆 鎴栬呴殣钘忔带浠讹纴UserControl銆俈isibility = visibility.Collapsed