Quantcast
Channel: C#タグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9703

Mobile Blazor Bindings を使用したMac版アプリケーションで最小化ボタンを有効にする方法

$
0
0

概要

Mobile Blazor Bindings を使用して Mac用アプリケーションを作っているときに、最小化ボタン(左上にある黄色のボタン)を有効化する方法

結論

AppDelegate.cs の style を設定している箇所に NSWindowStyle.Miniaturizable を追加する。

詳細

AppDelegate.csに書かれているAppDelegateクラスのコンストラクタにstyleの設定が定義されているので、style設定にNSWindowStyle.Miniaturizable を追加する。

変更前
publicAppDelegate(){varstyle=NSWindowStyle.Closable|NSWindowStyle.Resizable|NSWindowStyle.Titled;varrect=newCoreGraphics.CGRect(200,1000,1024,768);MainWindow=newNSWindow(rect,style,NSBackingStore.Buffered,false)// 以下省略}
変更後
publicAppDelegate(){varstyle=NSWindowStyle.Closable|NSWindowStyle.Miniaturizable|NSWindowStyle.Resizable|NSWindowStyle.Titled;varrect=newCoreGraphics.CGRect(200,1000,1024,768);MainWindow=newNSWindow(rect,style,NSBackingStore.Buffered,false)// 以下省略

これだけでOK

終わり

多分将来の自分がまた同じように迷うと予想しているので備忘録として記事にしておく。


Viewing all articles
Browse latest Browse all 9703

Trending Articles