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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:03:32+00:00 2026-05-15T14:03:32+00:00

How do I add .CS functionality to XAML classes built in Expression Design? I

  • 0

How do I add .CS functionality to XAML classes built in Expression Design?

I have a Silverlight project handed to me by designers that does not seem to have much functionalty to it yet. One of the first things I have noticed is that there does not seem to be any corresponding .cs files that match up with what appears to be children of the “LayoutRoot”. I mean, as it appears in Expression Blend, these are child nodes in the “Objects and Timeline Tab” under “LayoutRoot”.

When viewed in Visual Studio 8, they appear to be children nodes of of the Page.xaml class. Shouldn’t the first step be that I generate some .cs files or class to handle the functionality of these grids? I did a search on the name of the first child grid and I did not get any results in any of the existing .cs files. How do I generate .cs files?

  • 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-15T14:03:33+00:00Added an answer on May 15, 2026 at 2:03 pm

    The Grid is commonly used as a container control for the entire page. You normally don’t deal with it directly. If you have controls in the grid, you deal with those controls. Give them names(ie.. x:Name=”someName”), then deal with the events for those controls. It’s almost exactly like WinForms in regards to controls and dealing with events.

    For example, here is some XAML from a WPF project(I know it’s not Silverlight but basically the same)

      <Grid x:Name="LayoutRoot">
         <Canvas 
              x:Name="canvas1" 
              Height="100" 
              HorizontalAlignment="Left" 
              Margin="116,62,0,0" 
              VerticalAlignment="Top" 
              Width="200">
    
          </Canvas>
    
          <Button 
              x:Name="btnGetChildren" 
              Content="Get Children" 
              Height="23" 
              Margin="174,209,218,47" 
              Width="75" 
              Click="btnGetChildren_Click" />
      </Grid>
    

    Notice that I have a Canvas and a Button “inside” the Grid. Notice that the button has a Click event that I am handling. The code for that click event is in the “xaml.cs” file for the page.

    private void btnGetChildren_Click(object sender, RoutedEventArgs e)
    {
        foreach (UIElement element in canvas1.Children)
        {
            // some code
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a legacy C API that I need to add functionality to. Specifically
I need to add functionality to the close button in my class that extends
A client wants to add functionality to a system that will distribute large files(~700mb)
I want to add functionality for the zoom in/out image that display by the
I am trying to add functionality to a webpage that will allow the user
I have to add functionality to an existing application and I've run into a
I have a task to add logging functionality to the existing workflow based solution.
I'm trying to add functionality in my program that will allow the user to
I need to add functionality to that button, but i dont know the name
We have a languaging mechanism that recurses through our XAML pages when they load,

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.