かずきのBlog

C#やJavaやRubyとメモ書き

目次

Blog 利用状況

ニュース

わんくまBlogが不安定になったため、前に書いてたはてなダイアリーにメインを移動します。
かずきのBlog@Hatena
技術的なネタは、こちらにも、はてなへのリンクという形で掲載しますが、雑多ネタははてなダイアリーだけに掲載することが多いと思います。
コメント
プログラマ的自己紹介
お気に入りのツール/IDE
プロフィール
経歴
広告
アクセサリ

書庫

日記カテゴリ

[C#][WPF]Windows FormにWPFを置く

巷にもよくある情報だけど、Windows FormのアプリケーションにWPFを置く方法。

  1. Windows Form Applicationを作成する
  2. WPFのUserControlを作成する(作成後ビルドもする)
  3. <UserControl x:Class="WinFormAndWPF.WpfContent"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
        <Grid>
            <Button Content="Hello world" />
        </Grid>
    </UserControl>
    
  4. WPF相互運用機能からElementHostをフォームに置く
    image
  5. ホストするコンテンツの選択で、表示したいWPFのUserControlを選択する
    image
  6. 完成(上がWPFで下が普通のWindowsFormのボタン)
    image

フォーム上に置いたWPFのUserControlは、普通のWindows Formのコントロールと同じように、フィールドに変数が作られる。ということで、普通に使える。
image

投稿日時 : 2008年7月1日 23:33

Feedback

# [WPF][ADO.NET]DataSet(DataTable)をWPFのListViewにバインドしてみよう 2008/07/02 0:38 かずきのBlog

[WPF][ADO.NET]DataSet(DataTable)をWPFのListViewにバインドしてみよう

# 『Windows XP』販売終了だが、今後も入手性とサポート面に問題なし 2008/07/02 19:33 Newsブログ検索結果BLOG

この1週間は、Microsoft にとって重要な期間だった。共同創設者の Bill Gates 氏が正式に第一線から身を引き、その数日後には『Windows XP』の販売が終了した。公式には、Windows XP を入手できるのは6月30日が最後だったが、実際にはそうではない。Microsoft が OEM 先のパソコンメーカーに対する Windows XP の販売を終了したのは確かだが、パソコンメーカー各社は、在庫が続く限り販売を継続でき、それ以外にも抜け道が数多くあ...

# welded ball valve 2012/10/18 23:43 http://www.jonloovalve.com/Full-welded-ball-valve-

Some truly good blog posts on this website, regards for contribution. "The spirit is the true self." by Marcus Tullius Cicero.

# Womens Supra Skytop 2012/12/07 18:51 http://supratkstore.webs.com/

What i don't understood is in reality how you are not actually much more neatly-appreciated than you may be now. You are very intelligent. You realize therefore considerably relating to this subject, made me for my part consider it from a lot of varied angles. Its like women and men are not involved except it's something to do with Lady gaga! Your personal stuffs excellent. Always take care of it up!

# catalogue la redoute 2012/12/12 11:15 http://www.promolaredoute.fr/

Don‘w not have a shot at so desperately, the top items can be purchased while you the minimum look forward to them to.

# エルメス女性 2012/12/14 20:44 http://www.hermespairs.info/category/エルメスバーキン

I apply earbuds away from home because health of their portability, even though I prefer over any ear.

# longchamp pliage 2012/12/15 15:31 http://www.soldesacslongchamp.info/category/sacs-l

I discover everybody is going to hate to them, but I don't even think they glimpse so poor.

# burberry outlet 2012/12/15 23:04 http://www.burberryuksale.org/category/burberry-sa

It's ACCEPTABLE. You can be a dailymotion star =)

# sneakers isabel marant 2012/12/18 2:13 http://sneakersisabelmrant-paris.webnode.fr

Keep in the excellent operate.

# sacmichaelkorssoldes.monwebeden.fr 2012/12/22 17:19 http://sacmichaelkorssoldes.monwebeden.fr

The stars of this pool include the comments and the pictures tend to be secondary.

# ckgucci 2013/01/08 3:04 http://www.robenuk.eu/

Contentment is known as a aromatise manage to survive swarm along other types without the need for buying a not many droplets along your own self.
ckgucci http://www.robenuk.eu/

# destockchine 2013/01/08 20:23 http://www.destockchinefr.fr/maillot-de-club-pas-c

Peaceful home life explore as a consequence of your identity, however , as a consequence of that What i am photographs are on you.
destockchine http://www.destockchinefr.fr/maillot-de-club-pas-cher/ligue-1-pas-cher/

# wonderful put up, very informative. I wonder why the other experts of this sector don't realize this. You must continue your writing. I am sure, you have a huge readers' base already! 2019/05/05 4:11 wonderful put up, very informative. I wonder why t

wonderful put up, very informative. I wonder why the other experts of
this sector don't realize this. You must continue your writing.
I am sure, you have a huge readers' base already!

# I am curious to find out what blog platform you have been using? I'm experiencing some small security problems with my latest blog and I'd like to find something more safeguarded. Do you have any solutions? 2019/05/09 11:54 I am curious to find out what blog platform you ha

I am curious to find out what blog platform you have
been using? I'm experiencing some small security problems with my latest blog and I'd like to find something more safeguarded.
Do you have any solutions?

# zTgYRQUoTxBsFQJeLBy 2021/07/03 2:47 https://amzn.to/365xyVY

Thanks for sharing this excellent write-up. Very inspiring! (as always, btw)

# HrSRhAmvwPTjOxpiFJ 2021/07/03 4:16 https://www.blogger.com/profile/060647091882378654

You can definitely see your enthusiasm in the work you write. The sector hopes for even more passionate writers like you who aren at afraid to mention how they believe. At all times follow your heart.

# Illikebuisse lrydq 2021/07/04 18:30 pharmaceptica.com

tadalafil side effects https://pharmaceptica.com/

# erectile disorder psychology 2021/07/08 15:57 hcqs tablet

difference between chloroquine phosphate and hydroxychloroquine https://plaquenilx.com/# where do you get hydroxychloroquine

# Hello i am kavin, its my first occasion to commenting anyplace, when i read this article i thought i could also make comment due to this brilliant post. 2021/07/12 21:11 Hello i am kavin, its my first occasion to comment

Hello i am kavin, its my first occasion to commenting anyplace, when i
read this article i thought i could also make comment due to this brilliant post.

# Spot on with this write-up, I truly feel this amazing site needs a great deal more attention. I'll probably be returning to see more, thanks for the advice! 2021/07/18 11:35 Spot on with this write-up, I truly feel this amaz

Spot on with this write-up, I truly feel this amazing site
needs a great deal more attention. I'll probably be returning to see more,
thanks for the advice!

# epnuiezbtzhc 2022/05/31 3:32 skkkmwfq

erythromycin lactobionate http://erythromycin1m.com/#

タイトル
名前
Url
コメント