-
- KeldorKatarn
- Posts: 243
- Joined:
Control Libraries
Is there any way to create control libraries for Unity? I don't know if there is a current workflow to support the default styles for controls.
Of course any ResourceDictionary containing them can be referenced, but apparently that cannot be done if a Unity Package containing them is in the Library/PackageCache because the origin of the package is on GitHub for example. If I set the path to "/Library/PackageCache/..." that doesn't seem to work.
The ThemeInfoAttribute also does not exist. So I'm assuming there is currently no way to create something like this?
I tried my best at hardcoding the styles but that does not seem to be working either? I'm parsing a XAML string to create them (since FrameworkElementFactory doesn't exist I cannot do it in C#). But when I do that, The UI stops being displayed, so the style not just don't work, they somehow stop NoesisView from rendering anything. I don't see any errors, so I don't know what's going on.
This doesn't seem to work:
Of course any ResourceDictionary containing them can be referenced, but apparently that cannot be done if a Unity Package containing them is in the Library/PackageCache because the origin of the package is on GitHub for example. If I set the path to "/Library/PackageCache/..." that doesn't seem to work.
The ThemeInfoAttribute also does not exist. So I'm assuming there is currently no way to create something like this?
I tried my best at hardcoding the styles but that does not seem to be working either? I'm parsing a XAML string to create them (since FrameworkElementFactory doesn't exist I cannot do it in C#). But when I do that, The UI stops being displayed, so the style not just don't work, they somehow stop NoesisView from rendering anything. I don't see any errors, so I don't know what's going on.
This doesn't seem to work:
Code: Select all
DefaultStyle = (Style)XamlReader.Parse(DefaultStyleXaml);
StyleProperty.OverrideMetadata(typeof(DialogHost), new FrameworkPropertyMetadata(DefaultStyle));
DefaultStyleKeyProperty.OverrideMetadata(typeof(DialogHost), new FrameworkPropertyMetadata(typeof(DialogHost)));
Re: Control Libraries
The way to achieve this is by using Unity packages and referencing the assets contained in the package with the URI '/Packages/PACKAGE_NAME'. This is how we provide access to our default themes.
Who is online
Users browsing this forum: No registered users and 8 guests