-
- kemarofangs
- Posts: 32
- Joined:
How To Add Expression Blend XAML w/ Code Behind
I'm trying to integrate an expression blend xaml into unity with noesis and having trouble.
The conversion doesn't seem to work. What am I doing wrong?
Here's the specific error. "Ignoring unknown type 'Silver_Gauntlet'"
Unity version 4.7.1.1f1
XAML that uses other custom defined xaml.
Custom defined xaml
Custom defined xaml code behind
The conversion doesn't seem to work. What am I doing wrong?
Here's the specific error. "Ignoring unknown type 'Silver_Gauntlet'"
Unity version 4.7.1.1f1
XAML that uses other custom defined xaml.
Code: Select all
<Canvas
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:darren="clr-namespace:Darren">
<Border x:Name="m_border_playerArms">
<darren:Silver_Gauntlet />
</Border>
Code: Select all
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:noesis="clr-namespace:NoesisGUIExtensions"
x:Class="Darren.Gauntlets_Silver"
Width="50" Height="20">
<!-- STUFF -->
</UserControl>
Code: Select all
using System;
namespace Darren
{
[Noesis.Extended]
[Noesis.UserControlSource("Assets/Darren/Graphics/Vector/Player/Clothing/Arms/Gauntlets_Silver.xaml")]
public class Gauntlets_Silver : Noesis.UserControl
{
/// <summary>
/// Initialization.
/// </summary>
public void OnPostInit()
{
}
}
}
-
-
sfernandez
Site Admin
- Posts: 3222
- Joined:
Re: How To Add Expression Blend XAML w/ Code Behind
Hi,
If your user control class is named Gauntlets_Silver, then you have to write exactly that name in the XAML:
As a sidenote, I suggest to avoid using "_" in your class names. as noted in MSDN Class Naming Guidelines.
If your user control class is named Gauntlets_Silver, then you have to write exactly that name in the XAML:
Code: Select all
<Canvas
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:darren="clr-namespace:Darren">
<Border x:Name="m_border_playerArms">
<darren:Gauntlets_Silver />
</Border>
-
- kemarofangs
- Posts: 32
- Joined:
Re: How To Add Expression Blend XAML w/ Code Behind
Thanks! I feel so dumb right now.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest