Git Product home page Git Product logo

Comments (4)

github-actions avatar github-actions commented on June 29, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

from microsoft-ui-xaml.

shinta0806 avatar shinta0806 commented on June 29, 2024

Hi, AI,
This case occurs even without DataTemplate.

from microsoft-ui-xaml.

JohnnyWestlake avatar JohnnyWestlake commented on June 29, 2024

Fwiw, this isn't a scenario that's advised (binding or manually setting Name property after compile time)
https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.frameworkelement.name?view=winrt-22621#name-and-data-binding
https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.frameworkelement.name?view=winrt-22621#setting-name-in-code

(Complicated by the fact that x:Bind generated code runs after InitializeComponent).

It looks like you're trying to use them as compile-time constants, which x:Bind looks like it could provide but doesn't actually provide unfortunately - instead it creates code that is executed at runtime to set the value, not actually compiling the value in.

from microsoft-ui-xaml.

shinta0806 avatar shinta0806 commented on June 29, 2024

Thank you for the information.

I wanted to unify constants in XAML and C#.
I wanted to specify Name in XAML and FrameworkElement.FindName() in C#.

However, it is unavoidable because of the restrictions you mentioned.
I close this ticket.

from microsoft-ui-xaml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.