Ognacの雑感

木漏れ日々

目次

Blog 利用状況

書庫

ギャラリ

WindowsFormには戻れない

アプリのUI画面で図形表示部品(線、楕円、矩形Etc)を扱う時、従来だと、描画コンテナーが表面化したとき、Invalidateとタイミング調整して描画ルーチンが起動するようにコーディングしていました。
リソースとメモリの制約もあって、「表面に見えている状態は一時点で一つの状態だから、必要になったときに更新する」という思想は妥当なモノでした。
線や矩形が存在することと、見えていることが別に管理することになるので object志向の面からは一貫性に欠ける感じがして、落ち着きませんでした。
 Xaml になって、線object,楕円objectと独立した扱いが可能になったのでロジックもスッキリしました。

 WindowsFormで小細工して実装した表示部分を作り替えたくなってしまったが、それは厳しいですね。
既存のFormアプリを載せ替えるのは、旧VBを .net.VBに書き換えることにも似て、労に報う価値はないと思う。
新規作成で、ぼちぼち置換していくかな。
GUI部分を独立される意味で XAMLは有効だと感じる。
(*) マウスクリックイベントがないのはなぜだろう。 MouseDownとClickを使い分けていたのでチト不満。

しかし、実際の現場でのXAML使用は進んているのだろうか。でも WindowsFormには戻れない私。

昔のVBはShape部品があって、昔に復帰した感じもありますね。
このような、本来なら不要な処理が、他の制約で必要になっている処理って、気付かないがありそうな気がする。

投稿日時 : 2011年9月19日 12:10

Feedback

# re: WindowsFormには戻れない 2011/09/19 22:52 Pasie.

 Visioで図形書いてXAMLになってくれるとすごくうれしいんですけどね。#作れ?(汗

# re: WindowsFormには戻れない 2011/09/20 0:05 ognac

>#作れ?(汗
作ったら分けてね

# re: WindowsFormには戻れない 2011/09/20 12:35 noname

svg→xamlではなくて?

http://blogs.wankuma.com/ogiogi/archive/2009/01/06/165699.aspx

# re: WindowsFormには戻れない 2011/09/20 23:38 ognac

図形=> xaml だけでなく、フロー図などのロジック図=> xamlも含めて、生成ツールの意味かと。

# We stumbled over here by a different website and thought I might as well check things out. I like what I see so now i am following you. Look forward to checking out your web page yet again. 2019/05/12 11:18 We stumbled over here by a different website and t

We stumbled over here by a different website and thought I might as well check things out.

I like what I see so now i am following you.
Look forward to checking out your web page yet again.

# Your way of explaining the whole thing in this piece of writing is really good, all be capable of simply know it, Thanks a lot. 2019/08/18 18:40 Your way of explaining the whole thing in this pie

Your way of explaining the whole thing in this piece of
writing is really good, all be capable of simply know
it, Thanks a lot.

# Ahaa, its fastidious discussion on the topic of this post at this place at this website, I have read all that, so now me also commenting at this place. 2021/08/24 16:09 Ahaa, its fastidious discussion on the topic of th

Ahaa, its fastidious discussion on the topic of this post at this place at this website, I have read all that, so now me also commenting at this
place.

タイトル
名前
Url
コメント