I would just like a few tips when i want to create a responsive UI.
I know how to use:
Dispatcher
Task
BackgroundWorker
Threads
I
FastObservableCollection
Manipulating PresentationSource
Using PLinq or Linq on multiple threads by using
AsQueryable() for dynamic filtering of data sources than single threaded and thread agnostic CollectionView.
Readymade Gifs over animation
Vitualization of non-virtualized panels like canvas
Deferred scrolling
Trigger.Exnter \ Exit Actions for animations.
BeginStoryboard.HandoffBehavior="Compose"
Using Hardware over software acceleration.
Avoiding WindowStyle=None, AllowTransparency=true, Background=Transparent, TileMode
Configure RenderOptions.BitmpaScalingMode as LowQuality and enable caching. Enable PresentationFontCache windows service.
Use Staticresources over Dynamicresources
Avoid inheritable dependency properties. Also avoid heavy operations in property changed call backs.
Use Freezable brushes. Avoid x:Name / Namescoping / Binding to their Color propertys them to be freezable all the time.
Set background of the border, if it encapsulates a visual than setting visual's background. Similar is if you have set a Brush as background of a visual then specify Brush.Opacity than Visual.Opacity.
Value converters must have minimulistic code. use Binding.IsAsync and PriorityBinding wherever applicable.
Use Expanders with IsExpanded=False by default.
CompositionTarget.Rendering fires on each rendering cycle so should be used only if required. Detatch it on any opportunity.
WPF DataGrid should avoid heavy use of combobox columns and editable Template columns, as the combobx templates try to load selected value and use the display member path by actually searching it from the items source of each combobox and template columns leak when used with highly observable collections.
Use WPF Extedned Tooklit based Shader effects and New Pixel Shader APIs such as Blur, Shadow.
And Many more...