Skip to content

colhountech/AcrylicUIExamples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AcrylicUI.Examples

A Simple WebForms App with 2 way binding between TextBox and ViewModel that raises OnPropertyChanged Event. Make Sure you build and run this version first and understand what's happening here with the 2 way binding.

Modified to turn into an Acrylic UI App

Specifically:

  1. Change the Form to AcrylicForm
  2. Add AcrylicUI NuGet Package

This is all you need to get started.

The following are necessary if you have a high DPI monitor (Basically, you are running your display higher than 1080p and have your scaling set to greater than 100%).

  1. Change HighDpiMode.PerMonitorV2
  2. Set AutoScaleDimensions
  3. Set AutoScaleMode.Dpi

This is necessary, or the designer will start to resize and change the scale and dimensions of your WinForms app and will totally mess up your display.

You can also Force the Designer to Dpi Unaware in the csproj file as follows:

    <ApplicationHighDpiMode>SystemAware</ApplicationHighDpiMode>
    <ForceDesignerDpiUnaware>true</ForceDesignerDpiUnaware>

Learn More about Dpi Unaware for the Designer here

Now, that we are finished with the setup, we can work on the asethetics:

  1. Reset the BackColor
  2. Make IsAcrylic true
  3. Label -> AcrylicLabel
  4. TextBox -> AcrylicTextbox
  5. Set PropertyChanged for MainViewModel

That's it. Now build and run your first AcrylicUI App

About

Examples from the Book on AcrulicUI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages