Creating custom part editbox.

Editors for WPF Forum

Posted 7 years ago by adam
Version: 12.2.0573
Avatar

Hi,

I would like to learn how to create custom part editbox. So I created sample project with the SocialSecurityNumberEditBox control, to see how it works. Here is my problem. The parts of the SSN number are hidden. Only two dashes are visible.

Can someone help me to figure out what am i missing? I attached my project: http://dl.dropbox.com/u/47949903/SSNTest.zip

 

Best Regards,
Adam

[Modified 7 years ago]

Comments (2)

Answer - Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Adam,

The issue has to do with where you are merging the styles for the SSN control and parts (i.e. the ThemeResources.xaml) file. Our Sample Browser loads the files up as part of the WPF theming system. This means that the Styles can be applied as "default" styles. The way you are merging in the ThemeResources.xaml file, the styles can only be applied as "implicit" styles.

Basically, you would need to create a folder called "Themes" in the root of your application's project. Then create a Generic.xaml file in that folder, with the following contents:

<ResourceDictionary
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		>
	<ResourceDictionary.MergedDictionaries>

		<ResourceDictionary Source="/SSNTest;component/CustomPartEditBoxSSN/ThemeResources.xaml"/>

	</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

  This will allow WPF to load up the ThemeResources.xaml properly. You can refer to our SampleBrowser to see how we did it there.


Actipro Software Support

Posted 7 years ago by adam
Avatar

Everything works fine. Thanks.

[Modified 7 years ago]

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.