All About Span: Exploring a New .NET Mainstay
Upgrading your .NET projects with Visual Studio
How to disable Bing button in Microsoft Edge?
- Create
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge
Key - Create
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\HubsSidebarEnabled
DWORD - Open
edge://policy/
in Edge and clickReload Policies
to check setting applied
How to Sign PowerShell Script (And Effectively Run It)
CRLF vs. LF: Normalizing Line Endings in Git
Solving common problems with Kubernetes
SVG Tutorial
ReaderWriterLockSlim Class
Xamarin Forms Themes And Styles
Introducing .NET MAUI
String to Lines
Multiple Command Parameters
Jekyll
Xamarin Pop-up Form
LINQ Group by Month, Sum and Count
Bing Maps
Android App Data Files
WPF ItemsControl
UWP Tile Notification
UWP Background Tasks
PowerShell vCard split
Hex <--> int
Entity Framework
- EF doesn’t support unsigned types. Use long for uint.
[DatabaseGenerated(DatabaseGeneratedOption.None)]
attribute to turn off auto generated keys.DbContext.Table.RemoveRange(from c in DbContext.Table select c)
to clear table. Or((IObjectContextAdapter)DbContext).ObjectContext.ExecuteStoreCommand("TRUNCATE TABLE [Table]")
for quick and dirty.[Key]
attribute to define primary key- Use
[Table("[Table]")]
on class for table name
- https://msdn.microsoft.com/en-us/library/jj193542%28v=vs.113%29.aspx?f=255&MSPPError=-2147217396
- https://stackoverflow.com/a/20184709/146360
- https://msdn.microsoft.com/en-us/library/jj591583%28v=vs.113%29.aspx?f=255&MSPPError=-2147217396
- https://stackoverflow.com/a/21885745/146360
- https://msdn.microsoft.com/en-us/library/jj200620%28v=vs.113%29.aspx?f=255&MSPPError=-2147217396
- https://stackoverflow.com/questions/20203492/entitytype-has-no-key-defined-error
- https://social.msdn.microsoft.com/Forums/en-US/648f9f5f-b844-48cb-85c3-74c8f2ee87cc/entity-framework-code-first-stop-autoincrement-and-use-my-primary-key?forum=adodotnetentityframework
- https://stackoverflow.com/questions/26303631/how-to-use-unsigned-int-long-types-with-entity-framework
App Custom Maps
UWP Logging
- https://stackoverflow.com/questions/32886613/logger-for-windows-10-uwp-app
- https://github.com/serilog/serilog
- https://docs.microsoft.com/en-us/windows/uwp/monetize/log-custom-events-for-dev-center
- https://github.com/Fody/Anotar
- https://stackoverflow.com/questions/30543689/how-to-use-serilog-with-unity
Removing characters which are not allowed in Windows filenames
Regex illegalInFileName = new Regex(@"[\\/:*?""<>|]");
string myString = illegalInFileName.Replace(myString, "");
Removing characters which are not allowed in Windows filenames
SyndicationClient.RetrieveFeedAsync returning error
var client = new SyndicationClient();
client.SetRequestHeader("accept", "text/html, application/xhtml+xml, */*");
client.SetRequestHeader("user-agent", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)");
UWP Localisation
XAML Styles
UWP File Access
- https://docs.microsoft.com/en-us/windows/uwp/files/fast-file-properties
- https://docs.microsoft.com/en-us/uwp/api/windows.storage.storagefile.properties
- https://docs.microsoft.com/en-us/windows/uwp/files/quickstart-managing-folders-in-the-music-pictures-and-videos-libraries
- https://docs.microsoft.com/en-us/uwp/api/windows.storage.search.queryoptions
- https://docs.microsoft.com/en-us/uwp/api/windows.storage.storagefolder
Xamarin Auth
Xamarin Android Context
StackOverflow: Bind two checboxes to a nullable bool property in MVVM
UWP Icons
UWP Device Enumeration
UWP Background Transfer API
Grid View Item Templates
Events with async/await
Xamarin Dropbox
- https://www.dropboxforum.com/t5/API-Support-Feedback/OAuth2-0-throws-invalid-grant-type-message-while-fetching-the/td-p/268801
- https://trevorhartsblog.com/2018/03/05/xamarin-android-dropbox-api-v2/
- https://www.dropboxforum.com/t5/API-Support-Feedback/How-do-I-set-the-Redirect-URI-port-number/td-p/243556
- https://stackoverflow.com/questions/41525569/xamarin-equivalent-to-webauthenticationbroker-getcurrentapplicationcallbackuri
- https://github.com/dropbox/dropbox-sdk-dotnet
Xamarin Azure
Xamarin UWP Debug
‘In the Core Project (.NET Standard Project) Properties > Compilation > Advanced > Select “PDB Only”’
Xamarin Navigation
ILMerge
Doesn’t work with .NET Core dlls due to pdb format
- https://peteris.rocks/blog/merging-net-assemblies-with-msbuild/
- https://github.com/Microsoft/ILMerge
- https://stackoverflow.com/questions/10137937/merge-dll-into-exe
- http://dotnettower.blogspot.co.uk/2014/12/visual-studio-post-build-event.html
- https://stackoverflow.com/questions/2556048/how-to-integrate-ilmerge-into-visual-studio-build-process-to-merge-assemblies
- https://github.com/Microsoft/ILMerge/issues/11
- https://stackoverflow.com/questions/3106855/build-with-ilmerge-error
Custom domains on GitHub Pages gain support for HTTPS | The GitHub Blog
Common UI Patterns in Xamarin Forms – Part 2 – Tabbed Pages
Creating a hamburger menu in Xamarin.Forms
Xamarin Forms Toolbar
Xamarin Custom Controls
Xamarin FontSize
Xamarin
Xamarin Icons
Wpf Togglebutton
Using WPF styles
WPF ProgressBar
Observable
ListView.ItemContainerStyle
StackOverflow: How to use binding in the ListBox’s Items to the ViewModel’s properties
Uwp Navigation
"Disabled" TextBlock
CollectionViewSource
CSS Truncate Text
StackOverflow: Superscript in CSS only?
StackOverflow: String format using UWP and x:Bind
CSS Tables
CSS List
CSS Layout
CSS Background
C# Rx Socket
LINQ Join
Wpf Could not load file or assembly System.Net.Sockets
Add to wpf project file
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
WPF Page in Frame
<Frame>
<Frame.Content>
<Page/>
</Frame.Content>
</Frame>
WPF Localisation
- http://putridparrot.com/blog/localizing-a-wpf-application-using-locbaml/
- https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/wpf-globalization-and-localization-overview
- https://wpf.2000things.com/2014/07/28/1123-localization-iv-download-and-build-the-locbaml-tool/
- https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/how-to-localize-an-application
- https://wpf.2000things.com/2014/07/24/1121-localization-ii-assigning-uids-to-all-localizable-elements/
StackOverflow: C# String Format for hours and minutes from decimal
XAML Binding
UWP ComboBox
UWP Adaptive Layout
Async/Await
- StackOverflow: The application called an interface that was marshalled for a different thread - Windows Store App
- StackOverflow: The application called an interface that was marshalled for a different thread in window 8
- StackOverflow: using await inside setters
- StackOverflow: Passing an *Awaitable* Anonymous Function as a Parameter
- StackOverflow: Correct way to get the CoreDispatcher in a Windows Store app