Git Product home page Git Product logo

fasetto-word's People

Contributors

angelsix avatar patrickhollweck avatar steelrazor47 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fasetto-word's Issues

validation doesnt work (message doesnt show)

Im trying to add validation to your sample but the validation message doesnt show. The validation executes but the validation message will never be shown. This seems to be an issue of the WindowChrome.WindowChrome stuff in the MainWindow. If i remove the WindowChrome stuff the validation message shows up. Heres an example:

<TextBox x:Name="NameTextBox" VerticalAlignment="Top"> <TextBox.Text> <Binding Path="FirstName" UpdateSourceTrigger="PropertyChanged"> <Binding.ValidationRules> <validations:NotEmptyValidationRule ValidatesOnTargetUpdated="True" /> </Binding.ValidationRules> </Binding> </TextBox.Text> <Validation.ErrorTemplate> <ControlTemplate> <StackPanel> <!-- Placeholder for the TextBox itself --> <AdornedElementPlaceholder x:Name="textBox"/> <TextBlock Text="{Binding [0].ErrorContent}" Foreground="Red"/> </StackPanel> </ControlTemplate> </Validation.ErrorTemplate> </TextBox>

public class NotEmptyValidationRule : ValidationRule { public override ValidationResult Validate(object value, CultureInfo cultureInfo) { var test = string.IsNullOrWhiteSpace((value ?? "").ToString()) ? new ValidationResult(false, "Field is required.") : ValidationResult.ValidResult; return test; } }

Window cut when TaskBar is moved

I downloaded the repo because I came across the WindowResizer by accident. I noticed a few bugs concerning the window in maximized state.

When I move the TaskBar from bottom to top, it not only cuts off the upper part but it doesn't position itself correctly and when the TaskBar is down again the window is directly above the TaskBar. See the picture below.

image

Another error is that if you enlarge the TaskBar and make it smaller again, the window remains compressed. See pictures 1 and 2.

1.)
image

2.)
image

I don't know if this repo is still being worked on but it would be nice if these bugs were fixed. Since I think this is a good work with the Resizer.

large data

Hello dear ,
Can you help me? I would try to retrive a large data under 50000 line in database but i don't know how to do?

  • i want to make a web service for that and wpf datagrid like you do in this project !

Merci ! Sorry for my bad english

WPF Application error

Hi,
I need help with the WPF application error that occurred when make it refers to another application

Error is "Can not create more than one system. windows.Application instance in the same Application.

thanks.

Memory Leak in FrameworkElementAnimationAttachedProperties

Hi there,

I think I´ve foud a memory leak in the "Animation stuff".

How did I achive this:
I created my own application with your YouTube series. It relies heavily on navigation through pages.
So, as soon as the user navigates to an other page, the old page should be destructed by the GC, but it´s not. It simply stays in the RAM.
I guess that´s due to some references in the FrameworkElementAnimationAttachedProperties.cs .
I think it´s propably the method that defines if the firstload flag is true or false.

I´ve also created a small application using PRISM to test if there is just a bug in my code, but that ended up with the same memory leak.

Cheers

MainWindow.xaml error with IsBusyProperty

I seem to get the following error and i have no idea on how to resolve it. Any help would be appreciated.

Severity Code Description Project File Line Suppression State
Error GenericArguments[0], 'HRM.AttachedProperties.IsBusyProperty', on 'HRM.AttachedProperties.BaseAttachedProperty`2[Parent,Property]' violates the constraint of type parameter 'Parent'. Indivumed.HRM C:\Users\Rainson\Documents\Visual Studio 2017\Projects\HRM\HRM\MainWindow.xaml 115

MinWidth and MinHeight does't work.

I've got no clue at this moment.. It worked fine when I first started.. But suddenly it doesn't anymore. I can resize it down to a dot....

MinWidth="{Binding WindowMinimumWidht}" MinHeight="{Binding WindowMinimumHeight}"

public double WindowMinimumWidht { get; set; } = 400; public double WindowMinimumHeight { get; set; } = 400;

This is still there.. But on mWindow.StateChanged += (sender, e) => Should this fire when I resize the window? At least it doesn't at the moment.

When Window is Maximized, it goes under the TaskBar.

Hello Luke,
I used your project as a base for a far simpler application but the WindowResizer class is left untouched: when the Window is maximized it seems to go under the TaskBar, covering part of the content.

This is what the Window looks like when the WindowState is set to Normal:
normal_window

And this is the result when the Window is maximized:
maximized_window

As you can see, the Button at the bottom of the Window is not visible.

Now, I dug into the WindowResizer class and I played a bit with the min/max assignments inside the WmGetMinMaxInfo() and, from the L405, I replaced the code like this:

lMmi.PointMaxSize.X = (int)SystemParameters.WorkArea.Width;
lMmi.PointMaxSize.Y = (int)SystemParameters.WorkArea.Height;

In this way the Window does no longer go under the TaskBar. However, I have a second monitor (1920x1080) to the right of the primary one (2560x1440) and when I drag the Window in the second monitor and I maximize it, it mantains the primary monitor sizes and overflows the borders. So, first of all I don't think what I did is the right way to do it and I think that, somewhere and somehow, I need to update those X and Y when the monitor changes. I'm not really into the thing, so I would like to know how the problem could be fixed.
Do you have the same problem? Thank you and keep on the hard work! 😊

Cannot bind different loggers in App.xaml.cs

First of all, great video series and tutorial!

How can we bind different loggers? It seems that only the same type of loggers can be bound using the code below.

App.xaml.cs

            // Bind file logger(s)
            IoC.Kernel.Bind<ILogFactory>().ToConstant(new BaseLogFactory(new[]
            {
                // TODO: Add ApplicationSettings so we can set/edit a log location
                //       For now just log to the path where this application is running
                new FileLogger("log.txt"),
                new ConsoleLogger()
            }));

Error:
CS0826 No best type found for implicitly-typed array

Question - Modify ObservableCollection from Non-UI-Thread

First of all: the YouTube videos are really amazing! So much knowledge is transported.

However, I have a problem of understanding:
I get data from a server via a REST API. If I want to add this data to the ObservableCollection, I get the error message that this is only possible from the UI thread.

System.NotSupportedException: 'This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread.'

So far I have made the following call for it:

App.Current.Dispatcher.Invoke ((Action) delegate ...);

But since I wanted to separate the ViewModels from the UI (as in Video 11), I don't know how to do it.
There doesn't seem to be any problems with the Fasetto.Word.Core project. In the corresponding SourceCode I also cannot find a (direct) call to the dispatcher. Is this because the filtering is also carried out on the UI thread? Or has something to do with the IOC (container)?How would you modify the ObservableCollections from a non-UI thread?

System.ArgumentException: 'The path is not of a legal form.'

When i try to use await element.SlideAndFadeInAsync(...) i get the error : System.ArgumentException: 'The path is not of a legal form.'

this happens when i run the following code:
protected override async void DoAnimation(FrameworkElement element, bool value, bool firstLoad) { if (value) // Animate in await element.SlideAndFadeInAsync(AnimationSlideInDirection.Bottom, firstLoad, firstLoad ? 0 : 0.3f, keepMargin: true); else // Animate out await element.SlideAndFadeOutAsync(AnimationSlideInDirection.Bottom, firstLoad ? 0 : 0.3f, keepMargin: true); }}

This happens when the value is true

Window "resize"

im not sure if i should compare your application with a normal windows one but there is another one issue:
when you grab and drug the bottom or the top edge and hit to the top-bot side the new size of the windows is not correct, there is a gap from the top side of windows and the really top of the screen.
Also i know that is not the right place to do questions but i couldn't find better. So i apologize if you already explained it at your videos but my question is: Why you have this hook at "Fasseto.Word\Window\WindowsResizer.cs" Line:268

            case 0x0024:/* WM_GETMINMAXINFO */

while this case is there at 0024 the application window cant resize the height and the width more than the main monitor dimensions. You need that for some reason ? a Windows app like Paint for example can get the height and the width of the virtual monitor. At this case if you relapse the 0024 with 0000 for example everything seems to work perfectly, except the fact that you can use all monitors now.
thank you in advance

Asynchronous method in FileManager

What is the purpose of running synchronous IO access on a new thread?
In FileManager:

 // Lock the task
 await AsyncAwaiter.AwaitAsync(nameof(FileManager) + path, async () =>
 {
       // Run the synchronous file access as a new task
       await IoC.Task.Run(() =>
       {
             // Write the log message to file
             using (var fileStream = (TextWriter)new StreamWriter(File.Open(path, append ? FileMode.Append : FileMode.Create)))
                 fileStream.Write(text);
      });
});

It could directly call fileStream.WriteAsync, which is more useful, instead of introducing a new thread for this job.

Full screen bug

i noticed that when i go full screen the borders on the gui are not right.
i took a screenshot with windows Sniping Tool on window snip mode and this is what i got:
(this running to secondary monitor with bigger resolution )
bug

Snapping/docking in certain conditions

The window fails to snap/dock to the edges correctly if the start bar is not on the bottom of the monitor or if the monitor is not 16:9 aspect ratio.

Can't Run

System.AggregateException: 'An error occurred while writing to logger(s). (The process cannot access the file 'D:\Documents\source\repos\fasetto-word\Source\Fasetto.Word.Web.Server\log.txt' because it is being used by another process.)'

Error loading project

Hi I have vs2015 community and now while building the latest solution I m getting the following error
please provide some solution or name the commits up to which I can run it.

Severity Code Description Project File Line Suppression State
Error The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. Fasetto.Word D:\vj\wpf\chat application\fasetto-word-develop\Source\Fasetto.Word.Core\Fasetto.Word.Core.csproj 1

ConcurrencyException

Hey, I can still trigger this Exception, which you have fixed in WPF#44:
Relational.ClientDataStoreDbContext'. Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962

It occurs if you open up the SettingsControl and log out during the data-fetching from the server. If you are fast enough you can trigger the exception in the ClearAllLoginCredentialsAsync() method or at least in the SaveLoginCredentialsAsync().

vertical dock, corner dock and maximize bug

When resizing vertically to the extent of the monitor the window docks with a gap
image

When dragging window to a corner of the monitor it docks with a gap
image

When window is anywhere on left monitor and is maximized this is the result (sorry for image size)
untitled-1

When window is anywhere on right monitor and maximized it disappears entirely I assume because it's docking to the top right corner of the total desktop rectangle.
[image of empty desktop with same layout as previous image]

I can reorganize my monitors for a variety of results.
untitled-1

Animation overlap

It is possible for the user to trigger any of the slide in animations multiple times if they are quicker with the click than the 0.3f animation duration. This causes the container to finish animating the margin but the visibility doesn't get set up properly.

To test: Click to open the "Attach a file..." dialog and double click on the paper clip. It will cause the popup to hide and show but once the show animation is complete it becomes invisible.

Window maximize on the wrong screen when using AeroSnap

Hello there,
I found your project on Youtube because I am looking for a solution with my attempt to make a borderless Window. But after I pulled the code I see that your window have the same issue than mine.
When I drag the Window to the top of the screen to maximize it with AeroSnap, the window is maximizing on the secondary screen, if more than 50% of the Window area is on the secondary screen during DragMove.
I hooked winProc Messages and listen to WM_WINDOWPOSCHANGING, and output the x and y values. But the coordinates are on the primary screen. So after WM_WINDOWPOSCHANGING something overrides the Window Position.
This behavior is pretty annoying, and if you have a monitor setup where the size and position of your monitors differs, the Title Bar of the window can be outside of the screen bounds so you have to know the shortcuts to get the window back on the screen.
After some testing, if found out that, if the Window is slightly larger than the target screen it maximize on the screen where it overlaps.
The solution for me was to decrease the Max width and height in the WmGetMinMaxInfo Method by 1.
The window maximize now on the correct Screen.
grafik
grafik

By the way: I saw that you are using the MonitorFromPoint Function to get the current screen in the WmGetMinMaxInfo Method. This only work during DragMove. When you use Window + Arrow Keys to move your Window this don’t work well. You can determ if the window is in DragMove with WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE and then use the MonitorFromWindow Function if the window isn’t moved by the mouse.

Errors using the code

I downloaded the fasetto word codes from this repo, I ran the, all what I'm getting is nothing less than 492 errors everywhere. Please what is possibly wrong with the codes? I am using visual studio 2015.

Use Fasetto.Word.Web.Server in WPF-Project

Hello Guy,
Can you tell me how i can referent your project "Fasetto.Word.Web.Server" to WPF-Project?

Repro Step:

  • Creat a WPF Project
  • Add Button named Start Server
  • Add Events to launch the Server in background by clicking on Button

I try to use the Nuget package approch but it s not work. Do you have any approch to solve this?

Thank you in Advanced
Ghislain from Germany!!

Question - Pass data between Viewmodels

Hi,

I have a view model field and I want to send another view model. I cant use object initialize because the constructor executions first and this field is null. I need this field in the constructor. I tryed constructor parameter but that didnt work i get a error;

image

Error:
'ProductDetailViewModel' must be a non-abstract type with a public parameterless constructor in order to use it as parameter 'TVm' in the generic type or method 'BasePage<TVm>'

P.S: sorry for my English :|
Thanks

Thank you for code.

Hello!

Thank you for your lecture.

When I open a project with Fasetto.Word.sln
Can't load Fasetto.Word.Core porject

The project's default XML namespace must be the MSBuild XML namespace. If the project was written in MSBuild 2003 format, add xmlns = "http://schemas.microsoft.com/developer/msbuild/2003" to the element, and the project was written in the previous 1.0 or 1.2 format Convert to MSBuild 2003 format.

My development configuration is Visual Studio 2015.

Please help me

Framework.Service bug

Hi, I'm having this issue when building:
System.NullReferenceException: 'Object reference not set to an instance of an object.'
at line :
public static IClientDataStore ClientDataStore => Framework.Service();
in the Core.IoC

what seems to be the probelm?

Maximized window cant grab from very top side

One next thing that should be fixed in the future is that :
while you are on full screen big or small monitor doesn't matter, you cant grab the window from the top edges so you can bring it back to (not maximized) state and move it around.
sorry in advance if you already know the issue.

somes errors on first build

I found this nice and big project. I download the source code and when I build on first time, I have some error. i search for many times but solution for me.
IDE : Visual studio 2017
Please help me.
Thank very very much

error

LoginViewModel binding for Email not working

First of all; thanks a lot for generously making this application and the videos available. This is invaluable for a WPF beginner like myself.

The issue we are exeriencing in the LogInView is that typing an email and pressing ENTER does not work (Email property is null). Clicking the button works as expected (Email property is populated).

Should not the Binding for the Email property work independently of how the command is invoked (ENTER or button-click)?

--
Thor A. Johansen

Initial state of Maximize overruns the taskbar

Calling WindowState="Maximized" in MainWindow.xaml or this.WindowState = WindowState.Maximized; after Initialization in MainWindow.xaml.cs causes the maximization on initial load to overrun the taskbar. Toggling the maximize command after loading remedies.

namespace Typo

The name space in this file
fasetto-word/Source/Fasetto.Word.Web.Server/Identity/IdentityErrorExtensions.cs
is written as "namespace Fasetto.Word.Web"
but it's supposed to be "namespace Fasetto.Word.Web.Server"

Attached Property issues (in xaml only it seems)

Hi,

This is most likely a xaml/designer issue. I'm getting the following errors in the "Texts.xaml" file for the attached properties:

image

image

image

The solution builds fine and the attached properties works as expected, but the designer errors is very annoying and breaks other styles in the Texts.xaml when designing.

Running VS 2017, community edition.

Any suggestions?

Spelling Issue in the Font ResourceDictionary

The values of the Font's ResourceDictionary are misspelled. The faulty keys are here

The current path is:
pack://appliction;,,,/Fonts/<FONT_NAME>
but should be
pack://application;,,,/Fonts/<FONT_NAME>

So "application" is just misspelled.

Unable to open database file

Im using sqlite core version 3.1.5, dna framework version 1.0.7.19.
This happened after I re install my windows os. Is this something to do with the os version.?

DockChanged not detected when discplay scaling at 100%

Hi,

I didn't know why AeroSnapping was not detected for me (the event didn't trigger), after some trial and error I found that
mTransformToDevice was always equal to Identity (default) so the code never made it past the line

if (mTransformToDevice == default(Matrix)) return;

in Window_SizeChanged.

This is because I have my Windows Scaling at 100%.

Removing this line caused me no issues and my windows Aero snapping now properly removes the border styling.

Design Time Exception

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

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.