Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6053765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:04:39+00:00 2026-05-23T08:04:39+00:00

I want to create a FilterControl in Silverlight: [Caption] [TextBox] [Clear button] I’d like

  • 0

I want to create a FilterControl in Silverlight:
[Caption] [TextBox] [Clear button]

I’d like to create it as a styleabel control, with the clear button functionality (I don’t want to leave it to the other developers), and with properties (Caption, FilterText).

But as far as I know and see, the first is a custom control, the second and the third are user control abilities.

Is it possible to create something, like that?


Here is the code of the CC:

<!-- Built-In Style for FilterControl -->
<Style TargetType="Controls:FilterControl">
    <Setter Property="Template">
        <Setter.Value>
            <!-- ControlTemplate -->
            <ControlTemplate TargetType="Controls:FilterControl">
                <!-- Template's Root Visual -->
                <Grid x:Name="LayoutRoot">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="{TemplateBinding Height}"/>
                    </Grid.RowDefinitions>

                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">

                        <!--FilterCaption PART-->
                        <TextBlock x:Name="FilterCaptionTextBlock" Text="{TemplateBinding FilterCaption}" VerticalAlignment="Center" />

                        <!--FilterTextBox PART-->
                        <TextBox x:Name="FilterTextBox"
                               HorizontalAlignment="Center" Text="{Binding FilterText, Mode=TwoWay}" IsEnabled="{Binding IsEnabled}" VerticalAlignment="Center" />
                        <!--<TextBox x:Name="FilterTextBox"
                               HorizontalAlignment="Center" Text="{TemplateBinding FilterText}" IsEnabled="{Binding IsEnabled}" VerticalAlignment="Center" />-->

                        <!--ClearFilterTextButton PART-->
                        <Button x:Name="ClearFilterTextButton"
                               Content="X" IsEnabled="{TemplateBinding IsEnabled}" VerticalAlignment="Center" />

                    </StackPanel>

                    <!--VisualStateManager-->
                    <VisualStateManager.VisualStateGroups>
                        ...
                    </VisualStateManager.VisualStateGroups>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:04:40+00:00Added an answer on May 23, 2026 at 8:04 am

    First lets be clear any FrameworkControl including a UserControl can be styled however I suspect what you may be refering to is the ability to replace the control’s template. The requires a custom templated control.

    The answer to your question is: yes of course it is.

    You would create a custom templated control, with the default template you prefer.

    Add Dependency properties to it for Caption and FilterText.

    Use TemplateBinding to wire the Captiona and Filter text to the elements in the default template.

    You would need to specify your template requires a TemplatePart of type TextBox.

    You would write code to watch for changes in the TextBox so that the control updates its Filter property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want create one simple windows form ,it just contain Editcontrol(textbox),Static Edit(label),Button (Name of
I want to create my Rails application with MySQL, because I like it so
I want create something that looks like the MSN Messenger chat forms. I am
I want create a button option that takes the entire datalist and converts it
I want to create my custom pin Start Button to win phone 7. For
Hi I want create an applet, and when I'm running it don't show anything
I want create 32 views like above view. so that what i modify in
I want create a helper class that containing method like cleanArray, split_char, split_word, etc.
Hi I want create an effect like below: http://img27.imageshack.us/i/19466828.png/ There is a class in
I want create arrays with object keys in PHP, i.e. something like this: <?php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.