概要
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
終わり
多分将来の自分がまた同じように迷うと予想しているので備忘録として記事にしておく。