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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:20:43+00:00 2026-06-07T03:20:43+00:00

My class IFrame can contain other IFrames: public interface IFrame { int Id {

  • 0

My class IFrame can contain other IFrames:

public interface IFrame
{
    int Id { get; }
    string Summary { get; }

    BindableCollection<IFrame> SubFrames { get; set; }
}

To present an IFrame, I have a custom UserControl:

<UserControl x:Class="Views.FrameView"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Views="clr-namespace:Views"
         mc:Ignorable="d" 
         x:Name="FrameXName">
    <StackPanel Orientation="Horizontal">
        <Label Content="{Binding ElementName=FrameXName, Path=Id}" Width="50"/>
    </StackPanel>
</UserControl>

With codebehind:

public partial class FrameView : UserControl
{
    public FrameView()
    {
        InitializeComponent();
    }

    public static DependencyProperty IdProperty = DependencyProperty.Register(
        "Id", typeof(int), typeof(FrameView));

    public int Id
    {
        get { return (int) GetValue(IdProperty); }
        set { SetValue(IdProperty, value); }
    }
}

And thus I can display a Frame in a FooView.xaml using:
<Views:FrameView x:Name="Frame1" Width="50" Height="50"/> IF I define the following in FooViewModel.cs:
public IFrame Frame1 { get { return Frames.ElementAt(1); } }

My Goal:

I want to have a FrameView displayed for every IFrame in a collection, for example:

<ItemsControl ItemsSource="{Binding Frames}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Views:FrameView x:Name="{Binding}" Width="50" Height="50"/>
                    </StackPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
</ItemsControl>

Where public BindableCollection<IFrame> Frames is defined.

Unfortunately, this does not work, the compiler says MarkupExtensions are not allowed for Uid or Name property values, so '{Binding}' is not valid.

How can I achieve my goal? Many thanks in advance.

  • 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-06-07T03:20:46+00:00Added an answer on June 7, 2026 at 3:20 am

    In your datatemplate you can replace

    <Views:FrameView x:Name="{Binding}" Width="50" Height="50" />
    

    with

    <Views:FrameView Id="{Binding Path=Id}" Width="50" Height="50" />
    

    should work fine

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

Sidebar

Related Questions

class X { int i; public: X() { i = 0; } void set(int
public class AutoResizeBox extends RichTextArea { public AutoResizeBox() { set(getElement()); } public static native
So basically I have something like this <div class=iframe-holder> <span></span> <iframe src=iframe.html width=200 height=200
class Widget; std::vector< std::shared_ptr<Widget> > container class Criterium { public: bool operator()(const Widget& left,
class A{ virtual int foo1(int a){ return foo1_1(a,filler(a)); } template<typename FunctionPtr_filler> int foo1_1(int a,
I can't find a way to get through this error. I've got this code
How can I get it so that when the user clicks on the Cancel
I have the inherited the following string (I can do nothing about the format):
I am using a rescue derived from MvcContrib: public class RescueAttribute : MvcContrib.Filters.RescueAttribute {
Given the following HTML snippet: <div class=image> <div class=placeholder> <a class=load iframe href=https://contestapp.com/images/4><img src=/uploads/image/image_file/4/thumb_he_sport_nutrition_for_active_kids_photo.jpg?1307271623

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.