Comments (3)
@mstasak your ideas for changes to the way navigation works and issues with updating bindings may be better addressed by changes to the actual WinUI Framework, as they aren't things that can be changed as part of TemplateStudio. Discussion or issues there may be a better place to see if what you're after could be made possible.: https://github.com/microsoft/microsoft-ui-xaml
from templatestudio.
A page already has an OnNavigatingFrom
method (which supports cancellation) and OnNavigatedFrom
.
Historically, things like saving data have been left to the developer and not included in TemplateStudio because there are many potential variations and uncertainties.
- Where should the data be saved?
- In what format should it be saved?
- What if the data is in an "incomplete" state (however that's defined) or doesn't meet app-specific validation requirements?
- How should validation rules be defined or enforced?
Because the above will vary by app (and even within a single app), it's not deemed appropriate for TempalteStudio to include a single way of doing this. Additionally, it's not practical to provide multiple options due to the practicalities of creating and supporting them or presenting them in a way that would make it easy for people using the wizard to be confident in knowing what they would get based on their selections.
The official Windows Developer blog also includes a recent post that may be useful/relevant.
from templatestudio.
Thank you. Page.OnNavigatingFrom does work with some caveats. Some other method would be needed to detect app closing. e.Cancel = True
will prevent navigating to another tab (NavigationViewItem) in a single page app with tab navigation, although the NavigationView will then be out of sync, reflecting the attempted change as if it were not canceled. The navigation attempt does not remove focus from an active TextBox, so it will not update its ViewController data source under the default binding update trigger mode for TextBoxes (UpdateSourceTrigger=LostFocus
). Setting AllowFocusOnInteraction="True"
on the NavigationView and NavigationViewItems does not help this. I've seen kludgy fixes involving changing the focused control prior to navigating, but wanted to avoid this (too hackish and might lose cursor and scroll positions). I guess I'll continue wrestling with this.
from templatestudio.
Related Issues (20)
- Navigating backwards doesn't use correct peer for previous child page
- Json Serialization doubled when using Setting Storage Template / FileService Bug?
- i got a error when i installed this project HOT 1
- TitleBarHelper still exists in 5.4 HOT 3
- Template Studio fails with `System.MissingMethodException` while clicking on "Create" HOT 15
- Content Grid User-Unhandled Exception
- VSIX Installer Fails to install Template Studio HOT 1
- File Picker
- Test Host Process Crashes HOT 1
- Setting Dark mode from Settings Page makes the Minimize, Maximize, and Close buttons invisible. HOT 14
- Replace win10-x64, win10-x86, win10-arm64 RuntimeIdentifier with win-x64, win-x86, win-arm64 for .NET 8.0 HOT 2
- Sample for WinUiEx Splash screen working with Template Studio based solution
- [WPF] Symbol icons appear as empty boxes after creating a new solution with Navigation Pane and MVVM Toolkit
- resource strings in package manifest are not replaced properly
- WPF Ribbon App no buttons configured
- Refactoring the base namespace after creation of a MVVM project for WinUI3 breaks the code HOT 4
- Defaults do not create a correct Store package
- Can't Use SqlClient if I select Self-Contain HOT 1
- Load the necessary SDKs with Template Studio. It is never clear if or which SDK I really need.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templatestudio.