GithubHelp home page GithubHelp logo

Design Time Exception about fasetto-word HOT 2 CLOSED

angelsix avatar angelsix commented on July 20, 2024
Design Time Exception

from fasetto-word.

Comments (2)

joshman1019 avatar joshman1019 commented on July 20, 2024 1

You may want to disable project code when working with this page. The page is attempting to gather the window width while in design time mode and fails. On the XAML designer you can enable and disable project code easily.

image

As an aside: I would recommend using event triggers and storyboards instead of animating in the code-behind. It will make your life easier when using the designer. His method for animating was good, but I found it overly complicated and hard to debug. Cases like this popped up all of the time. You can easily make a custom animation control that can be used across other projects.

from fasetto-word.

ahmedtalaat327 avatar ahmedtalaat327 commented on July 20, 2024

Hello,

I am getting this error:

at System.Windows.Controls.Page.System.Windows.IWindowService.get_Width() at System.Windows.Controls.Page.get_WindowWidth() at UI.Animation.PageAnimations.SlideAndFadeInFromRight(Page page, Single seconds) in UI\Animation\PageAnimations.cs:line28 at UI.Pages.BasePage1.AnimateIn() in \UI\Pages\BasePage.cs:line 115 at UI.Pages.BasePage1.BasePage_Loaded(Object sender, RoutedEventArgs e) in \UI\Pages\BasePage.cs:line 97 at System.Threading.Tasks.Task.<>c.b__139_0(Object state) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

image

Because of this method: image If I change like this page.WindowWidth to 700: image

It's working, how can I fix this?

image

The only solution I've found is by adding d:Content="{Binding}" inside the frame itself not the page.

from fasetto-word.

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.