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 5960969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:53:59+00:00 2026-05-22T18:53:59+00:00

I inherited some code where I’ve seen this construction, which I’m not used to,

  • 0

I inherited some code where I’ve seen this construction, which I’m not used to, in several locations:

    <view:Content x:Name="TimeFrame" Margin="220,50,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" >
        <view:Content.ChildContent>
            <view:TimeFrame />
        </view:Content.ChildContent>
    </view:Content>

Which I must admit seems rather nifty, and thus far works as I want it too. However, then there’s this where instead of the <view:TimeFrame />-tag in the center there are a regular control-tags like so:

    <view:Content x:Name="SignInControl" Margin="466,317,0,0" HorizontalAlignment="Left" Width="348" Height="344" VerticalAlignment="Top">
        <view:Content.ChildContent>
            <Grid>
                <Border  CornerRadius="8,8,0,0" BorderThickness="1" Width="270" Height="300" Background="#666666" Margin="1,0,-1,0" Opacity="0.57"  >
                    <Border.Effect>
                        <BlurEffect/>
                    </Border.Effect>
                </Border>
                <Border  CornerRadius="8,8,0,0" BorderThickness="1" Width="270" Height="300" Background="#FFF3F5F4">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="15"/>
                            <RowDefinition Height="100"/>
                            <RowDefinition Height="25"/>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="20"/>
                            <RowDefinition Height="20"/>
                            <RowDefinition Height="auto"/>
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Row="0" Text="ChartWizz" FontFamily="Verdana" FontSize="10" Margin="0,3,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" />
                        <ToggleButton Style="{StaticResource up_down}" Checked="ToggleButton_Checked" />
                        <Image Source="Pictures/logo_250.png" Margin="5"  Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" />
                        <StackPanel Width="210" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" >
                            <TextBlock Text="Change User or"  Margin="0,0,3,0" FontFamily="Verdana" FontSize="11" />
                            <Button Style="{StaticResource LinkButton}" Click="CreateNewAccLink_Click" Margin="2, 0, 0, 0">
                                <TextBlock Text="Create new account" FontFamily="Verdana" FontSize="11" Foreground="Black"   TextDecorations="Underline"/>
                            </Button>
                        </StackPanel>
                        <StackPanel Grid.Row="3" Orientation="Vertical" HorizontalAlignment="Center" >
                            <TextBlock  Text="Username" FontFamily="Verdana" FontSize="10" Margin="0,0,0,3" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox Width="210" Height="20" HorizontalAlignment="Left" />
                        </StackPanel>
                        <StackPanel Grid.Row="4" Orientation="Vertical" HorizontalAlignment="Center" >
                            <TextBlock  Text="Password" FontFamily="Verdana" FontSize="10" Margin="0,4,0,3" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <PasswordBox Width="210" Height="20" HorizontalAlignment="Left"  />
                        </StackPanel>
                        <Grid Grid.Row="5" HorizontalAlignment="Left" >
                            <Button Style="{StaticResource LinkButton}" Click="ForgotPassLink_Click" Margin="2, 0, 0, 0" HorizontalAlignment="Left">
                                <TextBlock  Text="Forgot your password?"  Width="Auto" Foreground="Black" TextDecorations="Underline" FontFamily="Verdana" FontSize="10" Margin="27,5,0,3" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            </Button>
                        </Grid>
                        <StackPanel Grid.Row="7" Width="210" Margin="0,5,0,0" Orientation="Horizontal" HorizontalAlignment="Center" >
                            <CheckBox  Content="Remember me" FontFamily="Verdana" FontSize="10" Margin="0,4,0,3" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <Button Width="60" Content="Sign in" Height="23" Margin="55,0,0,0" VerticalAlignment="Center" Click="SiginBtn_Click" />
                        </StackPanel>
                    </Grid>
                </Border>
            </Grid>
        </view:Content.ChildContent>
    </view:Content>

When I attempted to give the controls here names so that I could access them in code I got the following error:

Cannot set Name attribute value ‘txtBox_username’ on element ‘TextBox’. ‘TextBox’ is under the scope of element ‘Content’, which already had a name registered when it was defined in another scope.

I don’t know if it’s possible to access these members in some other way through the Content scope but if anyone would enlighten me I would be grateful. Either way I’d really like a link to a relevant MSDN page(or other resource) as I can’t seem to figure out what to search for in order to learn more about type tags.

Thanks

  • 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-22T18:54:00+00:00Added an answer on May 22, 2026 at 6:54 pm

    This behaviour is caused by how UserControls are implemented, see this question for workarounds.

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

Sidebar

Related Questions

I just inherited some code, and have not seen this format before. Here's an
I've inherited some code (not mine- I swear!) which uses a session variable in
I just inherited some code that has this construct: <target name=foo depends=-read.SOME.STRING, bar1, bar2>
Ive inherited some code which started out as an Android project but really is
I've inherited some code which breaks a page up into tabs using divs. On
I'm not sure what the problem is here, I've inherited some code form Zend
I've inherited some python code that contains a rather cryptic decorator. This decorator sets
I have inherited some code which involves a scheduled task that writes data (obtained
I have inherited some legacy code which generates a ton of inline styles. The
I've inherited some code and wanted to run this modification by you all, my

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.