Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to reference other DLLs #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ha11owed
Copy link

I have added the ability to reference other DLLs and .xaml ResourceDictionaries. This can be useful if you have your custom WPF controls or Styles and want to reference them in the .xaml documents.

for example this allows me to work with a .xaml like below by starting kaxaml with the following command line parameters: -i C:\pathto\MyControls.WPF.dll -i C:\pathto\ResDict.xaml. Previously this would have failed. Adding my DLL to the kaxaml installation folder would have solved the problem of recognizing the namespace, but it would still have failed when trying to use the StaticResources:

<StackPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:myControls="clr-namespace:MyControls.WPF.Controls.myControls;assembly=MyControls.WPF">
  <myControls:MyCustomControl ShowIdentifier="false" DatabaseId="0" ViewTemplate="{StaticResource HexTextBlock}" />
  <myControls:MyCustomControl ShowIdentifier="false" DatabaseId="2" ViewTemplate="{StaticResource VolumeMeter160to60}" />
  <myControls:MyCustomControl ShowIdentifier="false" DatabaseId="1" ViewTemplate="{StaticResource VolumeMeter160to60PeakRider}" />
  <myControls:MyCustomControl ShowIdentifier="false" DatabaseId="0" ViewTemplate="{StaticResource VolumeMeter160to60}" />

  <StackPanel Orientation="Horizontal">
    <TextBlock Text="Some horizontal values:" />
    <myControls:MyCustomControl ShowIdentifier="false" DatabaseId="2" ViewTemplate="{StaticResource SimpleFloatTextBlock}" />
    <myControls:MyCustomControl ShowIdentifier="false" DatabaseId="1" ViewTemplate="{StaticResource FloatTextBlock}" Index="1" />
    <myControls:MyCustomControl ShowIdentifier="false" DatabaseId="0" ViewTemplate="{StaticResource SimpleFloatTextBlock}" Index="2" />
  </StackPanel>
</StackPanel>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant