thinkpixellab / bot Goto Github PK
View Code? Open in Web Editor NEWA collection of libraries and demos for WPF, Silverlight, and Windows Phone 7.
Home Page: http://thinkpixellab.com
A collection of libraries and demos for WPF, Silverlight, and Windows Phone 7.
Home Page: http://thinkpixellab.com
public static T WatchProperty(this T source, Action handler, params string[] propertyNames) where T : INotifyPropertyChanged
Looks like there's a memory leak when using StoryBoardTransition. I see an ever growing number of DoubleAnimation instances over time.
Looking at the code, this at least looks suspicious:
https://github.com/thinkpixellab/bot/blob/master/Wpf/Transitions/StoryboardTransition.cs#L79
The local "done" variable is used in the event handler here - doesn't make much sense. And the event handler is never unsubscribed.
The following on line 385 in minesweeper.cs causes an exception (something along the lines of 'attempt to throw propertychange event for a property that doesn't exist'):
public const string StatePropertyName = "StateLeft";
It should read:
public const string StatePropertyName = "State";
The exception occurs when you win or lose the game.
In addition, the "square_PropertyChanged" method uses a hard-coded string "State" and should reference the const above.
I'm pretty sure that on one of the old versions of the Graph control when I change the size of the window, and by that changing the available size of the Graph control, the children were re-arrange to use the available size.
The new version does not do that, it arrange the children as if it had all the space it require.
Thank you,
Ido.
To keep things...you know...interface-y
If a ReorderListBox will throw a NullReferenceException when used in a winform hybrid application. the reason is that the DragPreviewAdorner uses Application.Current, but this static property is not assigned when running in a winform application. A solution is to change the following method:
private static void GetCurrentDPI(out double x, out double y)
{
Matrix m = PresentationSource.FromVisual(Application.Current.MainWindow).CompositionTarget.TransformToDevice;
x = 96 / m.M11;
y = 96 / m.M22;
}
to
private static void GetCurrentDPI(out double x, out double y, FrameworkElement element)
{
Matrix m = PresentationSource.FromVisual(element).CompositionTarget.TransformToDevice;
x = 96 / m.M11;
y = 96 / m.M22;
}
and pass the current element in SetPreviewElement:
public void SetPreviewElement(FrameworkElement element)
{
//...
GetCurrentDPI(out x, out y, element);
Side note: the class NotifyWorker seems to have the same issue in the OnClientException method... haven't looked at how that could be handled. We aren't using that class.
I have an application with a TabControl
and several TabItem
.
Each TabItem
has an AnimatingTilePanel
. My ItemTemplate has a thumbnail image.
Even with ~100 max items per tile panel, the performance degrades and out of memory exceptions are occasionally thrown when switching tabs. Swapping out the AnimatingTilePanel
for a plain old VirtualizingStackPanel
shows a measureable performance increase and is error free.
Is AnimatingTilePanel
just not able to handle that many items at that size? Or are there some tricks that I could be employing?
...should mention Add
Reentrancy checks are skipped...which can be very dangerous :-/
When an element is dragged outside the vertical bounds of the listbox, the item that was previously on top (or bottom) will get selected.
A workaround for this is:
_myListBox.SelectionChanged += delegate
{
if (_myListBox.SelectedIndex != -1)
_myListBox.SelectedIndex = -1;
};
Fail!
Implementation thoughts:
n
After run WPF4 demo and choose whatever in menu it shows exception "Must use the rewriter when using Contract.Requies"
It works only on some demos.
These does not work:
Animating Title Panel
Graphs
Org Tree
Set game
Treemap panel
Zap controler
In wpf.Core.SampleImageHelper......GetDefaultPicturePaths() you might consider changing the literal path as it bombs out if you don't have your Pictures in the default location.
e.g.
change:
return new string[]{@"C:\Users\Public\Pictures\Sample Pictures",
Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)}.ToReadOnlyCollection();
to:
return new string[]{Environment.GetFolderPath(Environment.SpecialFolder.CommonPictures) + @"\Sample Pictures",
Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)}.ToReadOnlyCollection();
Mind you anyone able to use a non-default location could probably figure this out for themselves.
if TransitionPresenter content have Alignment (eg: Center), and have no background. The animation could't get the margin. The animation will cause content stretch.
After run WPF4 demo and choose whatever in menu it shows exception "Must use the rewriter when using Contract.Requies"
Since the great file move around, Demo_SL4.sln, Demo_WP7.sln, and Demo_WPF4.sln still have the old folder names in their project references, though Demo_All.sln properly reflects the new structure. The other solutions need to be updated to run in VS straight out of the box. I'd fix it myself and submit a pull, but at the moment I'm on a work computer without git. :(
Whenever a listbox contains more items than it can handle, by default it will display a scrollviewer.
The reordering will stop to function properly when this happens.
The first thing i notice is that because of the standard virtualisation of the ItemsPanel, Transform item breaks because the item with an index higher than the ones visible will return null at ItemContainerGenerator.ContainerFromIndex(i) as FrameworkElement. This however is easily fixed by declaratively implementing a non virtualized ItemsPanel.
Second, the position of the overlay adorner is not updated when scrolling occurs. The adorner scrolls with the content of the ListBox and thus moves up or down.
The behaviour is easily reproduced by setting a ListBox height to 120 in the demo app.
Any clues on how to fix the second issue/observation?
Regards,
avsomeren
Hi,
I'm planing with the InfoTextBox control and I've noticed and issue.
I picture would say a thousand words, so please take a look:
http://yurysweb.com/tmp/InfoTextBox_bug.jpg
As you can see from the screenshot, the selection doesn't get cropped.
Thanks,
Yury
Have a reorder handle of sorts in the data template. Allowing selection + reorder is an important use case to demonstrate.
Right now you can't select items in the list box.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.