giovanni_
giovanni_

Reputation: 35

Shaped windows form uwp with c#

Hi i want to create a shaped windows form in uwp with c#. How can I do that? I have not found in internet such topic for uwp but there are examples for winform.

Upvotes: 0

Views: 722

Answers (1)

Dai
Dai

Reputation: 154995

UWP and WinForms are distinct UI platforms.

  • WinForms is a .NET wrapper around Win32 windowed controls.
  • UWP is a new WinRT-based UI system in Windows 10 derived from the XAML/Jupiter framework in Windows 8, itself based on WPF.

In addition to being a UI platform, UWP applications also must run in a sandbox (only Microsoft's own apps can break-out of the sandbox, such as the Settings app).

UWP is very restrictive with respect to what developers can do with the UI toolkit and window appearance, for example:

  • You cannot have windows that are not those rectangular top-level windows.
  • You cannot have window alpha-transparency (which also rules-out non-rectangular windows).
    • Side-note: the latest SDK permits "glass-effect" areas, but this is not the same thing as what you're asking: Transparent UWP windows 10
  • The default control library is also very aneamic - for example, there are no controls like tree-view, not even a data-grid control! You'll need to bring your own (either build or license it).
  • UWP is also very prescriptive when it comes to the visual appearance of your application. You can tweak and re-skin your application but it takes a lot of work to escape the original "Metro" design language that started with Windows Phone 7.

Because UWP is so restrictive it really limits the usefulness of the platform outside of simple "toy" applications or 'app'-style programs with a very limited feature set (i.e. UWP is inappropriate for something like Photoshop, Visual Studio - or anything requiring system integration - but okay for things like chat clients).

So anyway, what you're asking to do is impossible.

Upvotes: 3

Related Questions