Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
LocationWindows フォームでは、プロパティを に設定することでフォームの場所を設定できましたPoint。WPFで同様のことを行うことは可能ですか?
Location
Point
現在、WPFウィンドウLeftとTopプロパティを設定して再配置できることはわかっていますが、ポイントのように座標を指定して位置を設定することはできますか?
Left
Top
オブジェクトを操作したい場合は、いつでも独自のヘルパー メソッドを作成できますPoint。
public Point Location { get { return new Point(Left, Top); } set { Left = value.X; Top = value.Y; } }
Winforms の Location プロパティに相当するものは、WPF の Left プロパティと Top プロパティだけです。