GithubHelp home page GithubHelp logo

windowscommunitytoolkitdocs's Introduction

Welcome to the Windows Community Toolkit Documentation

The Windows Community Toolkit is a collection of helper functions, custom controls, and app services. It simplifies and demonstrates common developer tasks building apps for Windows 10.

Contributing

Do you want to contribute or update the docs? Read the contribution guidelines

When opening a PR, start by forking this repository. Then, based on the type of change you're making you'll need to create a new branch from either the main or dev branches:

❗ If you have a typo or existing document improvement to an already shipped feature, please base your change off the main branch. This will allow us to get the change to the published documentation between releases.

🆕📚 For documentation regarding any new features, please base your fork off the last updated dev branch. For example: 'dev/7.1.0'.

We will merge updates from the current main branch to the latest dev branch to keep it in-sync with any updated changes. We will periodically sync the main branch automatically with the live branch to pick up any changes made over time. When we make a new release, we will integrate the dev branch into the main branch in order to publish documentation for new features.

Documentation Links

Microsoft Open Source Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

windowscommunitytoolkitdocs's People

Contributors

arcadiogarcia avatar arlodotexe avatar avknaidu avatar dend avatar dhurataj avatar harinikmsft avatar hhchaos avatar huynhsontung avatar kyaa-dost avatar mattwojo avatar mcleanbyron avatar meganbradley avatar michael-hawker avatar mrlacey avatar nmetulev avatar nschonni avatar peteams avatar quinnradich avatar rloutlaw avatar rosuavio avatar salmanmkc avatar sergio0694 avatar shweaver-msft avatar skendrot avatar sohchatt avatar vgromfeld avatar vijay-nirmal avatar vsc-service-account avatar xaml-knight avatar yoshiask 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

windowscommunitytoolkitdocs's Issues

Multiple texts on a single column

Is there anyway of binding multiple texts to a single column?

Until today, what I did was a ListView with a grid inside, and each TextBlock of the grid accepted the <Run> command, so I could just put multiple Run commands to join various texts.
(For example: I printed up/down arrow + the current price + the currency symbol on a single TextBlock)


Detalles del documento

No edite esta sección. Se requiere para docs.microsoft.com ➟ Vinculación de problema de GitHub.

Wrong Text

在Configure the WPF application project小节上方的Note中的“<HostFrameworkProject”缺少了闭尖括号“>”


文档详细信息

请勿编辑此部分。 docs.microsoft.com ➟ GitHub 问题链接必须具有此部分。

GazeProgressEventArgs should be DwellProgressEventArgs

In the Examples section talking about Animations, the example for disabling default animation shows the use of GazeProgressEventArgs, which doesn't seem to exist. Should be DwellProgressEventArgs.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

InvokeScriptAsync Doesn't exist in current version

The documentation references InvokeScriptAsync, but in the current version all I see is InvokeScript and it doesn't have the args parameter. (on the WebViewCompatible)

And the documentation makes reference to InvokeScript but links to InvokeScriptAsync which has different parameters.

So there's no way to invoke a script with parameters as far as I can tell with the current version unless the documentation is wrong and there is some other way to call it.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Something happened to the table formatting

looks like the Double ones are displaying wrong, not sure if there's something else...


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Bad implementation in DataGridColumn's properties no BINDING!

It is funny how bad implementations leaves other programmers to waste an entire day of work. If you see any good implementation of UWP user control that deserves respect. At lease a conscious programmer knows that if you are implementing a component or user control it must enable bindings for its visual properties. So why DataGridColumn Width for example does not implement its dependency property so I for example can bind to it. It is so simple do something like this:

public abstract class DataGridColumn : DependencyObject {
public static readonly DependencyProperty WidthProperty = DependencyProperty.Register("Width", typeof(DataGridLength), typeof(DataGridColumn), new PropertyMetadata(DataGridLength.Auto));
public DataGridLength Width
{
get { return (DataGridLength)GetValue(WidthProperty); }
set { SetValue(WidthProperty, value); }
}
...
}

Oh no wait, I do have one chance, to create a new class let say, DataGridViewColumnEx, put new in Width add DependencyProperty also a timer, oh yes, a timer to watch for the changes of Width, that would be nice!... This is sarcasm... right.

I hope if someone see this, especially the one that implemented this, fix it please so we can be happy.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Webview control in VB.net program

Great article.
Could you include examples in vb.net?
I have a program in VB and need to update the webbrowser control for the webview control


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

XAML example incorrect

There are two issues with the XAML.

  1. The line

xmlns:behaviors="using:Microsoft.Toolkit.Uwp.UI.Animations.Behaviors"/>

should be

xmlns:behaviors="using:Microsoft.Toolkit.Uwp.UI.Animations.Behaviors">

  1. The line

</behaviors:Rotate>

should be deleted.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

AddWebAllowedObject method is not supported

Should be added to the section next to ObjectForScripting


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Code example causes an compiler error

The if statement in To modify a generated column section causes a CS131 compiler error. To solve this, please update documentation to

//Modify the header of the "Name" column
if (e.Column.Header.ToString() == "Name")
{
    e.Column.Header = "Task";
}

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

wrong spelling in code

wrong spelling in example code, missing letter s in "Extensions"
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extenions"


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Typo in Section 3

Row: Only ROW header cells are displayed.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

DataGrid TemplateColumn CalenderDatePicker or DatePicker Flashes Then Dissappears.

Hi,

I am interested in having a date picker as a column in the Toolkit DataGrid. I have added the CalendarDatePicker to the DataTemplateColumn with both the CellTemplate and CellEditingTemplate. When the DataGrid is initially render it shows my set date fine. However, when I click on the DataGrid cell (to go into edit mode) the CalendarDatePicker appears. When I click on the calendar icon the Calendar flashes and then disappears. The same happens with the DatePicker.

I have tried with the CalendarDatePicker resource set to both CellTemplate and CellEditingTemplate as well as TexBlock set to CellTemplate and CalendarDatePicker set to CellEditingTemplate (shown below).

Is there a setting to fix this? Any help is appreciated. Robert

Here is my sample code:
<UserControl.Resources>






</UserControl.Resources>

<dg:DataGrid x:Name="grdNotes" >
dg:DataGrid.Columns
<dg:DataGridTemplateColumn CellTemplate="{StaticResource CalendarCell}" CellEditingTemplate="{StaticResource CalendarCellEdit}"/>
</dg:DataGrid.Columns>
</dg:DataGrid>

About OperatingSystemArchitecture property

In fact, this property is a "Target" architecture of app package, not Operating System Architecture. For example, Many of UWP apps in 2019 are build as x64, x86 and Arm. If you install the sort of this app on Arm64 system, Arm package will be deployed. Thus, this property may returns "Arm" - not Unknown. I believe that we need to update the documentation to inform this. Thankyou.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Use Grouping and Sorting

I've been trying to use a CollectionViewSource and other things to get this thing to group. I'm starting with an observableollection. Is there an example somewhere to show how to do this?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

PostBuildEvent needs quotes on paths

copy script in the postbuild event for the UWP Class Library should quote the paths in case there are spaces in $(SolutionDir)


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

We cant find the AlternateRowBackground property in DataGrid docs.

In DataGrid.md we can see this code

       <controls:DataGrid AlternateRowBackground="LightGray"/>

But we cant find the AlternateRowBackground property in DataGrid and we can find the property AlternatingRowBackground.

And I set the AlternatingRowBackground property and it can work.

We can see silverlight is using AlternatingRowBackground

https://docs.microsoft.com/en-us/previous-versions/windows/silverlight/dotnet-windows-silverlight/cc189381%28v%3dvs.95%29

Loading items from the source collection into the IncrementalLoadingCollectino when the window resizes or by other visual changes

I have the following code,

public class Person
{
public string Name { get; set; }

    public override string ToString() => Name;
}

public class PeopleSource : IIncrementalSource<Person>
{
    private readonly List<Person> people;

    public PeopleSource()
    {
        people = new List<Person>();
    }

    public async Task<IEnumerable<Person>> GetPagedItemsAsync(int pageIndex, int pageSize, CancellationToken cancellationToken = default(CancellationToken))
    {
        var result = (from p in people
                      select p).Skip(pageIndex * pageSize).Take(pageSize);

        await Task.Delay(1000);

        return result;
    }

    public void Load(int Min, int Max)
    {
        people.Clear();
        for (int i = Min; i <= Max; i++)
        {
            var p = new Person { Name = "Person " + i };
            people.Add(p);
        }
    }
}

And, the UWP MainPage.xaml contains a ListView named "MainListView", two buttons named "RefreshButton" for refresh and "LoadButton" for loading the source collection with desired items and its code behind have this,
public sealed partial class MainPage : Page
{
PeopleSource _peopleSource;
IncrementalLoadingCollection<PeopleSource, Person> collection { get; set; }
public MainPage()
{
this.InitializeComponent();
_peopleSource = new PeopleSource();
collection = new IncrementalLoadingCollection<PeopleSource, Person>(_peopleSource);

        this.Loaded += (sender, e) =>
        {
            MainListView.ItemsSource = collection;
        };

        RefreshButton.Click += (sender, e) =>
         {
             collection.Refresh();
         };

        LoadButton.Click += (sender, e) =>
        {
            _peopleSource.Load(1, 200);
            collection.Refresh();
        };
    }
}

Instead of letting IncrementalLoadingCollection to create a default instance of the PeopleSource from its parameterless constructor, I instantiating an object of PeopleSource and passing it to the constructor for loading the source collection with different items throughout the program. For the first time when the main window of the uwp project opens the ListView will be empty (doen't have any items). After clicking the Load button it still being empty. Nothing visible even though the source collection _peopleSource.people loaded with the items, not at all even if the RefreshButton clicked which refreshes the IncrementalLoadingCollection. If I try to bring changes to the UI or to the ListView visuals, like resizing the window or if the window contain a gridsplitter then resizing the columns, loading the ListView with the already loaded items from the source collection. This behavior wasn't noticed prior to version 2.2.0 where I'm using IncrementalLoadingCollection.RefreshAsync method. Hoping a quick response.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Webview control not displaying any page

Webview control not loading any page... No event is invoking.
my system configuration is
Visual Studio 2017 .NetFramework 4.6.2 and 4.7.1
Windows 10 version 1803 OS Build 17134.81
My development machine is in Hyper-V Manager
Even I have tried github samples... same issue. no error showing in output window
what could be reason ?

Regards
naresh


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Docs don't seem to be updated for 4.0 release

There are items missing from recent changes to documentation for 4.0 release


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Twitter Service question

Hi. I wonder why there is only GetUserTimeLineAsync() but nothing for 'GET statuses / home_timeline'. Is this something missing on purpose?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

DataGrid Performance

About a minute for the creation of the datagrid with 42 columns and 900 rows.

-Microsoft.Toolkit.Uwp.UI.Controls.DataGrid
-UWP
-Windows 10 Version: 1803
-Visual Studio 2017

UPDATE:

It take a minute, because the DataGrid was contained within an ScrollViewer element.

VS 15.8.5 now automatically picks up WebView control

Per the feedback on <dotnet/project-system#3754>, it is no longer required to add the Microsoft.Toolkit.Forms.UI.Controls.WebView.dll DLL to the component list for the control to appear in the Windows Forms designer (at least when using VS 15.8.5).


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Small type

The Start() method description says "Stats all animations" but should be "Starts all animations".


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

wrong using

In the newest version of the toolkit 4.0.0, dated August 7, 2018, ColorHelpers is in the namespace Microsoft.Toolkit.Uwp.Helpers.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Missing steps

Following these steps exactly did not work for me.

  1. I couldn't use the PostBuildEvents cause they weren't working and I had to copy files manually.
  2. The project did not work and kept getting parsing error because I needed to also copy the .xbf file. The current steps don't say anything about the xbf file.
  3. After I copied the Xbf I had to set the property "Copy to Output directory" to "Copy if newer"

Once I did all that the project worked like it was supposed to. It would also be helpful if there was a link to a project in source control that already does this. (If there is I couldn't find it)

Thank you!


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Need to clarify the OR in adding the DataGrid to XAML _or_ C#

To a developer new to XAML and C#, the "or" part of adding a DataGrid control to XAML or the C# code behind is easy to miss. If the developer copies and pastes the sample code as provided, it will not work as the DataGrid will be defined in two places. A brief paragraph to say this is an either-or situation and why you might pick one approach over the other would be welcome, even if it's just matter of taste).

In fact, it might be better to stick to either XAML or C# in the samples and then mention it can be done in the other way if required. i.e. the only sample code is for one or the other, not both.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

How can I add ColorAnimationUsingKeyFrames to a DropShadowPanel on Color Property?

I'm trying to add ColorAnimationUsingKeyFrames to a DropShadowPanel on a color property but I end up always breaking my program, can somebody help me out with this?

This is my code:
<ColorAnimationUsingKeyFrames Storyboard.TargetName="ChristmasBonusStarUpperDropShadowPolygonColor"
Storyboard.TargetProperty="(DropShadowPanel.Color).(SolidColorBrush.Color)"
RepeatBehavior="Forever"
AutoReverse="True">
<LinearColorKeyFrame Value="Silver" KeyTime="0:0:5"/>
<LinearColorKeyFrame Value="LightGray" KeyTime="0:0:2"/>
<SplineColorKeyFrame Value="Gray" KeyTime="0:0:2.5" KeySpline="0.6,0.0 0.9,0.00"/>
<DiscreteColorKeyFrame Value="Blue" KeyTime="0:0:3"/>
<LinearColorKeyFrame Value="Blue" KeyTime="0:0:5"/>
<LinearColorKeyFrame Value="LightBlue" KeyTime="0:0:2"/>
<SplineColorKeyFrame Value="DeepSkyBlue" KeyTime="0:0:2.5" KeySpline="0.6,0.0 0.9,0.00"/>
<DiscreteColorKeyFrame Value="Goldenrod" KeyTime="0:0:3"/>
<LinearColorKeyFrame Value="Goldenrod" KeyTime="0:0:5"/>
</ColorAnimationUsingKeyFrames>


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Quick start link points to old blog post

Link to the quick start on toast notifications points to an old blog posts, which then points to the correct link.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

WPF app not opening after adding WebView

I installed Microsoft.Toolkit.Wpf.UI.Controls.WebView (v5.1.0) nuget package. Added a WebView control to my app and now my app it won't open. If I comment out the WebView, the app opens normally again. Is there some bug introduced on 2/13/19?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

3 typos in the code

You should use:
Dictionary<string, object> simpleObjects = new Dictionary<string, object>();
simpleObjects.Add("simpleObjectValueOne", 47);
simpleObjects.Add("simpleObjectValueTwo", "hello!");
inststead:
Dictionary<string, object>() simpleObjects = new Dictionary<string, object>();
simpleObjects.add("simpleObjectValueOne", 47);
simpleObjects.add("simpleObjectValueTwo", "hello!");


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

"GraphLogin component" goes to broken link

404: https://docs.microsoft.com/en-us/dotnet/api/microsoft.toolkit.win32.ui.controls.winforms.graphlogin


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Code and usage examples

I understand this is still being worked on and that, obviously, documentation will be more scarce. I just happen to have started building this UWP that heavily relies on Grids exactly like the one this team is currently working on.
Is there anyway, or anywhere, where I can find a bit more detailed documentation and examples of usage? The one example on Github is too simple and not detailed enough. I wish there were code examples for the screenshots and captures on the documentation site.
I am getting a few errors when compiling my app with this DataGrid and I don't have anywhere to look for guidance.
Would you recommend me to just use a 3rd party grid for the time being? Or at least making my own, very sloppy grid until this one is released?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Xaml Sample Issues

Two things about the Xaml sample on this page. (1) It has a simple typo (which is easily worked around, but should still be fixed) (2) After installing Microsoft.Toolkit.Uwp.UI.Animations, when I add the Xaml sample code to an Xaml page, I cannot compile. I get the error: "Cannot find type Windows.UI.Xaml.Controls.NavigationView in module Windows.Foundation.UniversalApiContract.winmd."


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Facebook Service Issues

Greetings - I followed the instructions here and tried a few things by tweaking the facebook app settings and can't get the login to work, i.e. FacebookService.Instance.LoginAsync() always return false, and the UI just shows a flicker of the pop-up that is meant to ask me to log-in. Perhaps this has due to with Facebook updating their policies - "Use Strict Mode for Redirect URIs" is now mandatory (as is "Enforce HTTPS" (these are not mentioned in the docs). I tried entering the ms-app:// url
in the app settings in facebook dev portal in for Valid OAuth Redirect URIs (which the doc instructions say to leave blank) and that didn't help either - just can't get the service to log in.

p.s. FB also made it such that you can no longer use FacebookPermissions.PublishActions which is still included by default in the optional parameter for FacebookService.Instance.Initialize() - if you install the Windows Community Toolkit Sample App and try to use the Facebook Service demo there you'll see the error come up when you hit the "Connect" button.

Any guidance would be much appreciated.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Option to Add New row

Documentation does not say how to allow end user to add new row at runtime. If we need to create new set of controls to let the user input values, add to the collection and assign the collection to Itemssource of datagrid, its not quite intuitive. Need something similar to Access where you can allow user to key-in the new row directly...


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Broken link on page

[Enter feedback here]
Steps to reproduce:

  1. Please open the following doc:
    https://docs.microsoft.com/en-us/windows/communitytoolkit/helpers/incrementalloadingcollection

  2. Click the IIncrementalSource under the “Helper” title.


Error:
You will get 404 error (page not found) when navigating to link from step #2 above:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.toolkit.uwp.iincrementalsource-1

Expected:
No 404 error with content displaying

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Page not found

When clicking the link : DataGrid Sample Page Source get "Page not found"
can you fix this issue .
Thanks

error

Missing step

The doc states to go to a different page to set up for XAML Hosting. However those steps stating you need to add the api contract Windows.UI.Xaml.Hosting.HostingContract which is needed for the Windows.UI.Xaml.Hosting.WindowsXamlManager.InitializeForCurrentThread call:

Also why isn't the nuget package just settings all these things up using a .targets file?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ScriptNotify doesn't exist on the WebViewCompatible

The event doesn't exist so there's no way that we can respond to it. The documentation doesn't appear to reflect the current version.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

No printing function

Unfortunately there's no way to print the website.

The following line doesn't work:
await webView.InvokeScriptAsync("eval", new string[] { "window.print();" });

Really great to have Edge in a Windows Forms application, but without printing, it's difficult to replace it completely.

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.