text:
Update docXML comments in Dialogs.Choices folder

Pull in missing content from the equivalent JavaScript ref docs.

Pull Request Test Coverage Report for Build 64710

0 of 0   changed or added relevant lines in 0 files are covered.
46 unchanged lines in 5 files lost coverage.
Overall coverage remained the same at 71.111%

Files with Coverage Reduction
New Missed Lines
%

/libraries/Microsoft.Bot.Builder.Dialogs/Choices/FindValuesOptions.cs
2
50.0%

/libraries/Microsoft.Bot.Builder.Dialogs/Choices/FindChoicesOptions.cs
2
0.0%

/libraries/Microsoft.Bot.Builder.Dialogs/Choices/ChoiceRecognizers.cs
4
95.35%

/libraries/Microsoft.Bot.Builder.Dialogs/Choices/Find.cs
13
90.57%

/libraries/Microsoft.Bot.Builder.Dialogs/Choices/ChoiceFactory.cs
25
81.2%

Totals

Change from base Build 64616:
0.0%

Covered Lines:
4379

Relevant Lines:
6158

💛  - Coveralls

:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.AI.Luis.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.AI.QnA.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.ApplicationInsights.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Azure.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Dialogs.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.TemplateManager.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Configuration.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Connector.dll
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Schema.dll

authors: JonathanFingold coveralls fuselabs


text:
[PORT] fix bugs in getNextViableTime, getPreviousViableDate, getPreviousViableTime

Port this change from botbuilder-dotnet/master branch:
https://github.com/microsoft/botbuilder-dotnet/pull/4466

fixes: #4465
After checking these bugs and tested with freezing DateTime.UtcNow in BotBuilder-JS.
The bugs in getNextViableTime, getPreviousViableDate, getPreviousViableTime are now fixed.
However we lack of a test framework in C# to mock DateTime.UtcNow so that the tests related to that will be more meaningful.
Changed projects

AdaptiveExpressions

this is included in https://github.com/microsoft/botbuilder-js/pull/2707

source: gharchive/issue

authors: cosmicshuai tomlm

repo: microsoft/botbuilder-js

license: MIT

license_type: permissive

license_source: github-api


text:
Remove await when starting up a named pipe server.

Description
This PR removes a single word in code and adds a 43 word comment explaining why.

Pull Request Test Coverage Report for Build 81943

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.08%) to 86.804%

Totals

Change from base Build 81930:
0.08%

Covered Lines:
4606

Relevant Lines:
5103

💛  - Coveralls

source: gharchive/pull-request

authors: DDEfromOR coveralls


text:
Enable Deploy to specify region of Static Web App

As a: Engineer deploying Chat Copilot
I want: To the Static Web App resource to be deployed into the same region as all the other resources.
So that: I can reduce latency to load the static web app.

The Bicep defaults to deploying the Static Web App to westus2 and neither the deploy-azure.sh or deploy-azure.ps1 pass this parameter in during deployment. Therefore, it will always deploy to westus2 regardless.
Possible solutions:

Default the deployment location of the Static Web App to be the same as the location if not specified.
Add a parameter to deploy-azure.ps1 and deploy-azure.sh to allow setting this value.
Remove the parameter entirely and always deploy the Static Web App to the same location as the other resources.

I'm happy to submit a PR to resolve this if one of the options is preferrable. It is a minor issue, but I prefer all my resources in the same region if possible.

In an ideal world, putting all the resources in the same region would always be possible. However, because not all services are available and have available quota in all regions, we found it difficult to do so.
But, I agree, always putting the Static Web App on westus2 is not the optimal workaround to that problem.
Given the availability issues mentioned above, the second solution you propose is likely the best.
If you can submit a PR for this, we'll make sure to merge it promptly.

@glahaye, 100%. I'll add a parameter into deploy-azure.ps1, deploy-azure.sh to be passed through into the Bicep/ARM templates.
If it is possible to override the location of one of the resources (Static Web Apps), users might expect this to be possible for other resources. So, an optional enhancement might be to allow the user to pass their own params.json file through to the scripts. But for my needs, I only need everything in a single region - so I won't worry about this.

@PlagueHO, are you still planning on submitting a PR to this issue?

Hi @matthewbolanos - thanks for the reminder. Yes, working on it now.

Added!  Thanks, @PlagueHO

authors: PlagueHO glahaye matthewbolanos

repo: microsoft/chat-copilot


text:
SSH keychain items are too separated

Dev Home version
0.5
Windows build number
No response
Other software
No response
Steps to reproduce the bug
Pin the SSH keychain widget and have at least 2 connections listed
Expected result
No response
Actual result
Padding between each list item in SSH card is too tall compared to design spec, which has 4px for the padding

Included System Information
No response
Included Extensions Information
No response

Plan is to update spec to have the larger, 8 px margins. This aligns with the space between the items in the GitHub widgets.

authors: cinnamon-msft krschau

repo: microsoft/devhome


text:
Fix IShellItem.GetDisplayName memory leak

Summary of the pull request
This PR fixes a memory leak in the file picker code. See MS Learn docs mentioned in the comment.
Validation steps performed
Tested the file picker code path opening a file, works as expected.
PR checklist

[ ] Closes #xxx
[ ] Tests added/passed
[ ] Documentation updated

/azp run


text:
Add script to install the .NET Core SDK

This works on local dev boxes and on Azure Pipeline agents so that the SDK version we need is always installed on-demand.
I also updated the README and and added a CONTRIBUTING doc with more guidance on working in the repo. All the ps1 scripts I added came almost without changes from https://github.com/aarnott/library.template which is used in many repos, so feel free to review them carefully if you want, but they're pretty well battle-hardened already.

/azp run

repo: microsoft/dotnet-apiport


text:
Update version number in version.json

Version.json had out of date version number

A single fix has been reviewed in Dev branch.


text:
Add SameSite Cookie Property

Hi,
This descripes the request: https://github.com/aspnet/Security/issues/908
Please add this for .net framework 4.7.x
Thanks

Hello,
Is there any news about this feature request? For us this would also be a highly appreciated feature

Any update on this?
According to this comment: https://stackoverflow.com/questions/38954821/preventing-csrf-with-the-same-site-cookie-attribute#comment88140579_38957177 it's already built in .NET Framework 4.7.2 but it doesn't work for me?!

This still appears to be missing. If you use a DelegatingHandler to manually set a cookie in 4.7.2, you must add a CookieHeaderValue using response.Headers.AddCookies(). But CookieHeaderValue still doesn't have a SameSite property. Chrome 80 is due in less than a month so this is going to start being a problem for people very soon.

@seanwm Comments on closed issues are not tracked, please open a new issue with the details for your scenario.
You seem to be referring to a different set of APIs than the rest of this issue, specifically the System.Net.Http.Formatting APIs. CookieHeaderValue is defined in its own package over at https://github.com/aspnet/AspNetWebStack/blob/master/src/System.Net.Http.Formatting/Headers/CookieHeaderValue.cs, it's not part of the .NET or .NET Core runtimes. Opening an issue in AspNetWebStack would be a good start.
How do you anticipate SameSite impacting your WebApi scenario? WebApi's A) largely don't use cookies, and B) don't do the kind of redirects that would trigger SameSite protections.

@Tratcher

Specifically to https://msdn.microsoft.com/en-us/library/system.net.cookie(v=vs.110).aspx in support of CookieContainer, HttpWebRequest, and HttpClient?

For me, yes. Not trying be lazy here, happy to open a new issue if that's the right course of action. Unless you happen to know a quick answer as to why there's still no SameSite property for System.Net.Cookie on any platform?

authors: AlleSchonWeg Enjeej Tratcher brainbug89 seanwm tmenier

repo: microsoft/dotnet


text:
Add test coverage for WFP callout

Describe the feature you'd like supported
Add test coverage for the WFP callout implementing the XDP hook.
Proposed solution

Add coverage of XDP_TX case
Add coverage of various NMR + WFP/NDIS binding race conditions / failure modes
Add coverage of "attach program" and "delete program" on a system with non-idle network traffic

Additional context
We've hit several serious bugs by simply attempting to attach program and detach program at the XDP layer on a system with a fairly high rate of RX traffic.

Closing this issue as:

Add coverage of XDP_TX case : coverage exists
Add coverage of various NMR + WFP/NDIS binding race conditions / failure modes : ** covered by #2097 , #2099 and #2150 **
Add coverage of "attach program" and "delete program" on a system with non-idle network traffic : ** covered by #2097 , #2099 and #2150 **

authors: mtfriesen shankarseal

repo: microsoft/ebpf-for-windows


text:
Support compiling even without clang installed

Description
If the user does not have clang installed, it is impossible to build any of the pieces of the project.
Testing
No
Documentation
No -- a new CMake warning message has been added.

I hope that this little tiny commit is helpful! Thank you, as always, for letting me participate!
Will

@microsoft-github-policy-service agree company="Microsoft"

https://github.com/microsoft/ebpf-for-windows/blob/main/docs/GettingStarted.md point 8 says that clang is still required.  If it isn't required by either the VS build or the cmake build, we should update the Getting Started.

Great! I am on it!!
On Sat, Jul 15, 2023 at 5:44 PM Dave Thaler @.***>
wrote:

https://github.com/microsoft/ebpf-for-windows/blob/main/docs/GettingStarted.md
point 8 says that clang is still required. If it isn't required by either
the VS build or the cmake build, we should update the Getting Started.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/ebpf-for-windows/pull/2673#issuecomment-1636894214,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACCP2CV46GTQVDIF3TMGIPLXQMFKJANCNFSM6AAAAAA2LDJZ3A
.
You are receiving this because you were mentioned.Message ID:
@.***>

authors: dthaler hawkinsw


text:
fix: body background color variable

There is a slight discrepancy in background colors. This is related to the variable used in the css code. Both in light and dark mode.
There is:

There should be:

The problem lies in this variable:

To fix it it shoul be:
 background: var(--neutral-layer-1);

Hi,
Thanks for your report but this is actually 'by design'.
For the template we choose to give the NavMenu that slightly different background. In the demo we show a situation how those can be made the same.

In what demo may I ask?
Could you please put informations like this up front?

In what demo may I ask?
In the demo site (https://www.fluentui-blazor.net/). The one in your second screenshot. Code for that site is available here in the examples folder

Could you please put informations like this up front?
Not sure I understand what you mean by that. You want us to describe differences between the templates and demo environments?

While I don't see some CSS changes in a demo environment as bugs in the library, I do agree that there should be consistency and that the demo should resemble what you get when creating a site from the templates.
In reboot.css the background is set to --neutral-fill-layer-rest (#ffffff in light mode, #333333 in dark mde) so that is what we will use in the demo now as well.
Change is pushed to dev (so can be seen on preview site already. Will be on demo site with next release as well

repo: microsoft/fluentui-blazor


text:
fix: Dynamic FluentTab creation does not always completely select the new tab

🐛 Bug Report
Playing around with the dynamic tab creation -> https://www.fluentui-blazor.net/Tabs#dynamic i noticed that after creation the tab is not "completely" selected. The font is bold, but the navigation indicator isn't located at the new tab. Like this ->

🤔 Expected Behavior
I would expect that both the font and the navigation indicator (or however it is called) are at the newly created tab.
😯 Current Behavior
See the bug report. Font is bold and the navigation indicator goes to the newly created tab only if it starts from January, from any other tab it stops at the previously created tab.
🌍 Your Environment

OS & Device: Windows
Browser Google Chrome

This is am error in the underlying web component that we can't fix. Has been reported a number of times already. See for example #2536 and #2043.


text:
Small typo fix for "Export TypeScript Developer"

Just a small typo in the prompt description.

Thanks!

authors: derkoe pelikhan

repo: microsoft/genaiscript


text:
Update securitypolicy tool to support multiple registries

Before this change, the securitypolicy tool could authorize with a registry
by providing a username and password as command-line options.
This approach worked fine as long as all images were being pulled from the
same registry. It doesn't work if you need to access multiple registries.
After this change, authorization is provided in the policy.toml on a per-image
basis. This allows for mixing and matching different registries together as
part of a pod.
Signed-off-by: Sean T. Allen seanallen@microsoft.com

I got two! Can I get a merge?

repo: microsoft/hcsshim


text:
Remove automanaged vhd functionality

As the feature isn't being used in production and it was a non-ideal solution, remove the auto managed vhd functionality.
Signed-off-by: Daniel Canter dcanter@microsoft.com

Follow up cri PR will be linked here


text:
Add utility function for sharing files into UVMs from the host

This PR refactors out sharing files in the UVM into a new call on the UtilityVM. This allows us to make a more generic call that can be used later on for adding files for both LCOW and WCOW.
This will be used later on in the dynamic resources work.
Signed-off-by: Kathryn Baldauf kabaldau@microsoft.com

@kevpar PTAL if you can, I'm curious what you're feedback on this change would be.


text:
Investigate use of Join Index Rule V2 when #buckets on indexes on both sides of join are different

Describe the issue

Discussion thread: Thanks @imback82 for pointing this out:
https://github.com/microsoft/hyperspace/pull/124#discussion_r514548371
  spark.conf.set("spark.sql.autoBroadcastJoinThreshold", "-1")
  import spark.implicits._
  spark.sql("DROP TABLE if exists t1").show
  spark.sql("DROP TABLE if exists t2").show
  val df1 = (0 until 100).map(i => (i % 5, i % 13, i.toString)).toDF("i1", "j1", "k1")
  val df2 = (0 until 100).map(i => (i % 5, i % 13, i.toString)).toDF("i2", "j2", "k2")
  df1.write.format("parquet").bucketBy(4, "i1").saveAsTable("t1")                            // Bucket by i1
  df2.write.format("parquet").bucketBy(4, "i2", "j2").saveAsTable("t2")                    // Bucket by i2, j2
  val t1 = spark.table("t1")
  val t2 = spark.table("t2")
  val joined = t1.join(t2, t1("i1") === t2("i2") && t1("i1") === t2("j2"))                 // i1 = i2 and i1 = j2
  joined.explain(true)
  spark.sql("drop table t1")
  spark.sql("drop table t2")

Result:
== Optimized Logical Plan ==
Join Inner, ((i1#34 = i2#40) && (i1#34 = j2#41))
:- Filter isnotnull(i1#34)
:  +- Relation[i1#34,j1#35,k1#36] parquet
+- Filter (((i2#40 = j2#41) && isnotnull(i2#40)) && isnotnull(j2#41))
   +- Relation[i2#40,j2#41,k2#42] parquet

== Physical Plan ==
*(5) SortMergeJoin [i1#34, i1#34], [i2#40, j2#41], Inner
:- *(2) Sort [i1#34 ASC NULLS FIRST, i1#34 ASC NULLS FIRST], false, 0
:  +- Exchange hashpartitioning(i1#34, i1#34, 200)
:     +- *(1) Project [i1#34, j1#35, k1#36]
:        +- *(1) Filter isnotnull(i1#34)
:           +- *(1) FileScan parquet default.t1[i1#34,j1#35,k1#36] Batched: true, Format: Parquet, Location: InMemoryFileIndex[file:/C:/Users/apdave/github/hyperspace-1/spark-warehouse/t1], PartitionFilters: [], PushedFilters: [IsNotNull(i1)], ReadSchema: struct<i1:int,j1:int,k1:string>, SelectedBucketsCount: 4 out of 4
+- *(4) Sort [i2#40 ASC NULLS FIRST, j2#41 ASC NULLS FIRST], false, 0
   +- Exchange hashpartitioning(i2#40, j2#41, 200)
      +- *(3) Project [i2#40, j2#41, k2#42]
         +- *(3) Filter (((i2#40 = j2#41) && isnotnull(i2#40)) && isnotnull(j2#41))
            +- *(3) FileScan parquet default.t2[i2#40,j2#41,k2#42] Batched: true, Format: Parquet, Location: InMemoryFileIndex[file:/C:/Users/apdave/github/hyperspace-1/spark-warehouse/t2], PartitionFilters: [], PushedFilters: [IsNotNull(i2), IsNotNull(j2)], ReadSchema: struct<i2:int,j2:int,k2:string>, SelectedBucketsCount: 4 out of 4

Neither side is able to utilize bucketing.
Now if we set spark.sql.shuffle.partitions = 4, we can use bucketing on the right side
*(4) SortMergeJoin [i1#40, i1#40], [i2#46, j2#47], Inner
:- *(2) Sort [i1#40 ASC NULLS FIRST, i1#40 ASC NULLS FIRST], false, 0
:  +- Exchange hashpartitioning(i1#40, i1#40, 4)
:     +- *(1) Project [i1#40, j1#41, k1#42]
:        +- *(1) Filter isnotnull(i1#40)
:           +- *(1) FileScan parquet default.t1[i1#40,j1#41,k1#42] Batched: true, Format: Parquet, Location: InMemoryFileIndex[file:/C:/Users/apdave/spark-warehouse/t1], PartitionFilters: [], PushedFilters: [IsNotNull(i1)], ReadSchema: struct<i1:int,j1:int,k1:string>, SelectedBucketsCount: 4 out of 4
+- *(3) Sort [i2#46 ASC NULLS FIRST, j2#47 ASC NULLS FIRST], false, 0
   +- *(3) Project [i2#46, j2#47, k2#48]
      +- *(3) Filter (((i2#46 = j2#47) && isnotnull(i2#46)) && isnotnull(j2#47))
         +- *(3) FileScan parquet default.t2[i2#46,j2#47,k2#48] Batched: true, Format: Parquet, Location: InMemoryFileIndex[file:/C:/Users/apdave/spark-warehouse/t2], PartitionFilters: [], PushedFilters: [IsNotNull(i2), IsNotNull(j2)], ReadSchema: struct<i2:int,j2:int,k2:string>, SelectedBucketsCount: 4 out of 4

Problem
We need to decide whether or not to add the check spark.sql.shuffle.partitions == numBuckets while picking an index based on the following criteria:

if t1.buckets == t2.buckets, spark can eliminate shuffle irrespective of spark.sql.shuffle.partitions
if t1.buckets != t2.buckets && spark.sql.shuffle.partitions == t2.buckets, spark can eliminate t2 side shuffle.

To Reproduce

Expected behavior

Environment

Question by @imback82
https://github.com/microsoft/hyperspace/pull/124#discussion_r514830755

repo: microsoft/hyperspace


text:
repeat every, start not running

nothing happens anymore.

fixed

authors: pelikhan tballmsft

repo: microsoft/jacdac


text:
drop mut for variables that are not mutated to enable build with rust 1.72.0

kata-types: drop mut for variables that are not mutated
agent: drop mut from variable which is not mutated

The cc-msft branch is currently unused. Please use cc-msft-prototypes as the target branch.

repo: microsoft/kata-containers


text:
Opinionated Deployment Scripts

Motivation and Context (Why the change? What's the scenario?)
High level description (Approach, Design)

When you have a chance, could you squash the changes into a single commit? The PR will be easier to manage in case we have other changes and we need to rebase. Thanks

When you have a chance, could you squash the changes into a single commit? The PR will be easier to manage in case we have other changes and we need to rebase. Thanks

this is the best I can do.  I merged with the Main somewhere in the middle and now I cannot squash commits before this merge

authors: cherchyk dluc

repo: microsoft/kernel-memory


text:
Discussion: Ease the support of high contrast themes for accessibility

Discussion: Ease the support of high contrast theme for accessibility
To support the high contrast themes, the only way to test the XAML change is to change the Windows OS settings. This is slow process and it is not comfortable for a developer who has normal vision. There is a workaround to use the Windows Simulator, but there is an issue for multiple months that launching the Simulator will break OneDrive and the sync will need to be re-synched from scratch.
Suggestion: Visual Studio could provide a way to change in a faster way the high contrast theme. This can be in the design view or even better in the debugging bar that is integrated in the app at runtime.

The XAML designer should be able to be set into every possible mode the app can be run in, and perhaps even run conditions, so the app will override system defaults whilst being debugged?

The ability to set the Visual Studio XAML Designer to display different High Contrast modes would be great. Consider this a big thumbs up for that suggestion.
When testing for this at the moment (I currently automate changing to the different high contrast modes at a system level and then running the app while taking screenshots for later comparison) I know there are lots of challenges over accessing the appropriate system resources when the desired mode is not enabled for the OS. That makes me strongly suspect that modifications in Windows itself may be required to make this possible. Hopefully someone who knows all the specifics can tell me otherwise though.

I think this could be possible by creating a ResourceDictionary containing definitions for all the Brushes (e.g. SystemControlBackgroundBaseHighBrush, etc.) and Colors (SystemAltHighColor, etc.) that hard codes them to values equivalent to what they would be when Windows is in High Contrast mode. Then an app could test this simulated High Contrast mode by merging in this resource dictionary. I don't think it would be 100% accurate to true High Contrast mode, but it would probably be close enough to be useful for testing things without having to turn on High Contrast mode across the entire machine.

The complexity on creating a ResourceDictionary on our own, for each application is all the variations on the type of High Contrast, additionally keeping track of the growing set of colors that we add to our app themes might make editions more complex as time goes by. I would think that the easies way (from the developer's perspective) is have the designer support this in a way similar to "RequestedTheme" property of the Page, it could be inside the d namespace from Blend so that it remains only in design time, this way it is easy to spot issues and fix them. Although there is a missing piece in enabling this in design mode. Some elements of High Contrast are around interaction which require runtime, leading to the option to have this feature part of the debugger toolbar that shows up at the top of the window being debugged.

With all the recent increased focus on improving accessibility within Microsoft's own software, it would be terrible to see this be closed and deemed unimportant for those wanting to create software that is accessible to all users.

authors: ArchieCoder JuanMejiaVelez kmahone mdtauk mrlacey

repo: microsoft/microsoft-ui-xaml


text:
Unable to customize Teaching Tip

I am using the Teaching Tip control in a UWP app, and I am unable to change the background colour. The “IsLightDismissEnabled” property is set to True. On exploring further, the cause of the issue is in the Xaml file of TeachingTip - link - where the background is being set to a fixed value when IsLightDismissEnabled is True.
I copied the above XAML file into my application so that I could remove the line where the background is being set. However, without even making any changes an error is thrown “XamlCompiler error WMC0615: Type 'ThemeResource' used after '{' must be a Markup Extension. Error code 0x03e9.” on Line 15. This seems to be related to an open issue. I found this workaround. On applying this workaround (code attached) or commenting Line 15, no error is thrown but the teaching tip is not displayed properly with a random square getting displayed and the arrow at the wrong location -
Incorrect

Correct

Apart from editing the background, I would also like to make other changes to the XAML file of Teaching Tip to customize it according to my needs. Please advise how to do this. Thanks!
Windows 10 Version: Build 19041.450
Device Form Factor: Desktop
Workaround Code - only the first few lines are important, the rest is the same code of TeachingTip.xaml avaiable on your github
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Microsoft.UI.Xaml.Controls"
    xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
    xmlns:contract7NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,7)"
    xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives">

    <contract7Present:Style TargetType="local:TeachingTip" BasedOn="{StaticResource CustomTeachingTipStyle}">
        <Setter Property="CornerRadius" Value="{ThemeResource OverlayCornerRadius}" />
    </contract7Present:Style>

    <contract7NotPresent:Style TargetType="local:TeachingTip" BasedOn="{StaticResource CustomTeachingTipStyle}">
    </contract7NotPresent:Style>

    <Style x:Key="CustomTeachingTipStyle" TargetType="local:TeachingTip">
        <Setter Property="Background" Value="{ThemeResource TeachingTipBackgroundBrush}"/>
        <Setter Property="Foreground" Value="{ThemeResource TeachingTipForegroundBrush}"/>
        <Setter Property="BorderBrush" Value="{ThemeResource TeachingTipBorderBrush}"/>
        <!--<contract7Present:Setter Property="CornerRadius" Value="{ThemeResource OverlayCornerRadius}" />-->
        <Setter Property="ActionButtonStyle" Value="{ThemeResource DefaultButtonStyle}"/>
        <Setter Property="CloseButtonStyle" Value="{ThemeResource DefaultButtonStyle}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TeachingTip">
                    <Border x:Name="Container"
                          HorizontalAlignment="Left"
                          VerticalAlignment="Top"
                          Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="LightDismissStates">
                                <VisualState x:Name="LightDismiss">
                                    <VisualState.Setters>
                                        <Setter Target="TailEdgeBorder.Background" Value="{ThemeResource TeachingTipTransientBackground}"/>
                                        <Setter Target="TailPolygon.Fill" Value="{ThemeResource TeachingTipTransientBackground}"/>
                                        <Setter Target="TopTailPolygonHighlight.Fill" Value="{ThemeResource TeachingTipTransientBackground}"/>
                                        <Setter Target="ContentRootGrid.Background" Value="{ThemeResource TeachingTipTransientBackground}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="NormalDismiss"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ButtonsStates">
                                <VisualState x:Name="NoButtonsVisible">
                                    <VisualState.Setters>
                                        <Setter Target="CloseButton.Visibility" Value="Collapsed"/>

                                        <Setter Target="ActionButton.Visibility" Value="Collapsed"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="ActionButtonVisible">
                                    <VisualState.Setters>
                                        <Setter Target="CloseButton.Visibility" Value="Collapsed"/>

                                        <Setter Target="ActionButton.Visibility" Value="Visible"/>
                                        <Setter Target="ActionButton.(Grid.Column)" Value="1"/>
                                        <Setter Target="ActionButton.Margin" Value="{StaticResource TeachingTipRightButtonMargin}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="CloseButtonVisible">
                                    <VisualState.Setters>
                                        <Setter Target="CloseButton.Visibility" Value="Visible"/>
                                        <Setter Target="CloseButton.Margin" Value="{StaticResource TeachingTipRightButtonMargin}"/>

                                        <Setter Target="ActionButton.Visibility" Value="Collapsed"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="BothButtonsVisible">
                                    <VisualState.Setters>
                                        <Setter Target="CloseButton.Visibility" Value="Visible"/>
                                        <Setter Target="CloseButton.Margin" Value="{StaticResource TeachingTipRightButtonMargin}"/>

                                        <Setter Target="ActionButton.Visibility" Value="Visible"/>
                                        <Setter Target="ActionButton.(Grid.Column)" Value="0"/>
                                        <Setter Target="ActionButton.Margin" Value="{StaticResource TeachingTipLeftButtonMargin}"/>
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ContentStates">
                                <VisualState x:Name="Content">
                                    <VisualState.Setters>
                                        <Setter Target="MainContentPresenter.Margin" Value="{StaticResource TeachingTipMainContentPresentMargin}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="NoContent">
                                    <VisualState.Setters>
                                        <Setter Target="MainContentPresenter.Margin" Value="{StaticResource TeachingTipMainContentAbsentMargin}"/>
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CloseButtonLocations">
                                <VisualState x:Name="HeaderCloseButton">
                                    <VisualState.Setters>
                                        <Setter Target="TitlesStackPanel.Margin" Value="{StaticResource TeachingTipTitleStackPanelMarginWithHeaderCloseButton}"/>
                                        <Setter Target="AlternateCloseButton.Visibility" Value="Visible"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="FooterCloseButton">
                                    <VisualState.Setters>
                                        <Setter Target="TitlesStackPanel.Margin" Value="{StaticResource TeachingTipTitleStackPanelMarginWithFooterCloseButton}"/>
                                        <Setter Target="AlternateCloseButton.Visibility" Value="Collapsed"/>
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="IconStates">
                                <VisualState x:Name="Icon">
                                    <VisualState.Setters>
                                        <Setter Target="IconBorder.Margin" Value="{StaticResource TeachingTipIconPresenterMarginWithIcon}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="NoIcon">
                                    <VisualState.Setters>
                                        <Setter Target="IconBorder.Margin" Value="{StaticResource TeachingTipIconPresenterMarginWithoutIcon}"/>
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="HeroContentPlacementStates">
                                <VisualState x:Name="HeroContentTop">
                                    <VisualState.Setters>
                                        <Setter Target="HeroContentBorder.(Grid.Row)" Value="0"/>
                                        <contract7Present:Setter Target="HeroContentBorder.CornerRadius" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TopCornerRadiusFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="HeroContentBorder.CornerRadius" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="HeroContentBottom">
                                    <VisualState.Setters>
                                        <Setter Target="HeroContentBorder.(Grid.Row)" Value="2"/>
                                        <contract7Present:Setter Target="HeroContentBorder.CornerRadius" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BottomCornerRadiusFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="HeroContentBorder.CornerRadius" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource BottomCornerRadiusFilterConverter}}"/>
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="PlacementStates">
                                <VisualState x:Name="Top">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessTop}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Top"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="4"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="3"/>

                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TopThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopThicknessFilterConverter}}"/>

                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="0,0 10,10, 20,0"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="4"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="2"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Center"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Bottom"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginTop}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Bottom">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessBottom}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Bottom"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="0"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="3"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BottomThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource BottomThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Visible"/>
                                        <Setter Target="TopTailPolygonHighlight.HorizontalAlignment" Value="Center"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="0,10 10,0 20,10"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="0"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="2"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Center"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Top"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginBottom}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Left">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessLeft}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Left"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="4"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="3"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="1"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource LeftThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource LeftThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="0,0 10,10 0,20"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="2"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="4"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Right"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Center"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginLeft}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Right">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessRight}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Right"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="0"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="3"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="1"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource RightThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource RightThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="10,0 0,10 10,20"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="2"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="0"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Left"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Center"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginRight}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="TopRight">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessTop}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Top"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="4"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="3"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TopThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="0,0 10,10 20,0"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="4"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="2"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Left"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Bottom"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginTop}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="TopLeft">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessTop}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Top"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="4"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="3"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TopThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="0,0 10,10 20,0"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="4"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="2"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Right"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Bottom"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginTop}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="BottomRight">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessBottom}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Bottom"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="0"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="3"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BottomThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource BottomThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Visible"/>
                                        <Setter Target="TopTailPolygonHighlight.HorizontalAlignment" Value="Left"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="0,10 10,0 20,10"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="0"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="2"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Left"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Top"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginBottom}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="BottomLeft">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessBottom}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Bottom"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="0"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="3"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BottomThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource BottomThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Visible"/>
                                        <Setter Target="TopTailPolygonHighlight.HorizontalAlignment" Value="Right"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="0,10 10,0 20,10"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="0"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="2"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Right"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Top"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginBottom}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="LeftTop">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessLeft}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Left"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="4"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="3"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="1"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource LeftThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource LeftThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="0,0 10,10 0,20"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="2"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="4"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Right"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Bottom"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginLeft}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="LeftBottom">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessLeft}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Left"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="4"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="3"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="1"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource LeftThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource LeftThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="0,0 10,10 0,20"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="2"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="4"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Right"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Top"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginLeft}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="RightTop">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessRight}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Right"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="0"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="3"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="1"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource RightThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource RightThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="10,0 0,10 10,20"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="2"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="0"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Left"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Bottom"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginRight}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="RightBottom">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessRight}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Right"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="0"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="3"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="1"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource RightThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource RightThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="10,0 0,10 10,20"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="2"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="0"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Left"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Top"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginRight}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Center">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessTop}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Visible"/>
                                        <Setter Target="TailEdgeBorder.VerticalAlignment" Value="Top"/>
                                        <Setter Target="TailEdgeBorder.HorizontalAlignment" Value="Stretch"/>
                                        <Setter Target="TailEdgeBorder.Height" Value="{StaticResource TeachingTipBorderThickness}"/>
                                        <Setter Target="TailEdgeBorder.Width" Value="Auto"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Row)" Value="4"/>
                                        <Setter Target="TailEdgeBorder.(Grid.Column)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.RowSpan)" Value="1"/>
                                        <Setter Target="TailEdgeBorder.(Grid.ColumnSpan)" Value="3"/>
                                        <contract7Present:Setter Target="TailEdgeBorder.Margin" Value="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TopThicknessFilterConverter}}"/>
                                        <contract7NotPresent:Setter Target="TailEdgeBorder.Margin" Value="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopThicknessFilterConverter}}"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Visible"/>
                                        <Setter Target="TailPolygon.Points" Value="0,0 10,10, 20,0"/>
                                        <Setter Target="TailPolygon.(Grid.Row)" Value="4"/>
                                        <Setter Target="TailPolygon.(Grid.Column)" Value="2"/>
                                        <Setter Target="TailPolygon.HorizontalAlignment" Value="Center"/>
                                        <Setter Target="TailPolygon.VerticalAlignment" Value="Bottom"/>
                                        <Setter Target="TailPolygon.Margin" Value="{StaticResource TeachingTipTailPolygonMarginTop}"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Untargeted">
                                    <VisualState.Setters>
                                        <Setter Target="ContentRootGrid.BorderThickness" Value="{StaticResource TeachingTipContentBorderThicknessUntargeted}"/>
                                        <Setter Target="TailEdgeBorder.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopTailPolygonHighlight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TopHighlightRight.Visibility" Value="Collapsed"/>
                                        <Setter Target="TailPolygon.Visibility" Value="Collapsed"/>
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid MinHeight="{ThemeResource TeachingTipMinHeight}"
                              MinWidth="{ThemeResource TeachingTipMinWidth}"
                              MaxHeight="{ThemeResource TeachingTipMaxHeight}"
                              MaxWidth="{ThemeResource TeachingTipMaxWidth}"
                              AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="{StaticResource TeachingTipTailShortSideLength}"/>
                                <ColumnDefinition Width="{StaticResource TeachingTipTailMargin}"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="{StaticResource TeachingTipTailMargin}"/>
                                <ColumnDefinition Width="{StaticResource TeachingTipTailShortSideLength}"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="{StaticResource TeachingTipTailShortSideLength}"/>
                                <RowDefinition Height="{StaticResource TeachingTipTailMargin}"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="{StaticResource TeachingTipTailMargin}"/>
                                <RowDefinition Height="{StaticResource TeachingTipTailShortSideLength}"/>
                            </Grid.RowDefinitions>
                            <!-- This TailEdgeBorder needs to be z ordered underneath the TailPolygon while the TailOcclusionGrid needs to be over it, hence declaring these parts
                                 in this order. This is to achieve the desired occlusion of the tail's content edge border. The tail edge border is a low opacity highlight,
                                 which means we need to have the background color present underneath the highlight, hence the double grid here. -->
                            <Grid x:Name="TailEdgeBorder" Background="{TemplateBinding Background}">
                                <Grid Background="{TemplateBinding BorderBrush}"/>
                            </Grid>
                            <Polygon x:Name="TailPolygon"
                                     Fill="{TemplateBinding Background}"
                                     HorizontalAlignment="Left"
                                     VerticalAlignment="Top"
                                     Stroke="{TemplateBinding BorderBrush}"
                                     StrokeThickness="{StaticResource TeachingTipBorderThickness}"/>
                            <Grid x:Name="TailOcclusionGrid"
                                  HorizontalAlignment="Left"
                                  VerticalAlignment="Top"
                                  MinHeight="{ThemeResource TeachingTipMinHeight}"
                                  MinWidth="{ThemeResource TeachingTipMinWidth}"
                                  MaxHeight="{ThemeResource TeachingTipMaxHeight}"
                                  MaxWidth="{ThemeResource TeachingTipMaxWidth}"
                                  Grid.ColumnSpan="5"
                                  Grid.RowSpan="5">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="{StaticResource TeachingTipTailShortSideLength}"/>
                                    <ColumnDefinition Width="{StaticResource TeachingTipTailMargin}"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="{StaticResource TeachingTipTailMargin}"/>
                                    <ColumnDefinition Width="{StaticResource TeachingTipTailShortSideLength}"/>
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="{StaticResource TeachingTipTailShortSideLength}"/>
                                    <RowDefinition Height="{StaticResource TeachingTipTailMargin}"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="{StaticResource TeachingTipTailMargin}"/>
                                    <RowDefinition Height="{StaticResource TeachingTipTailShortSideLength}"/>
                                </Grid.RowDefinitions>
                                <Polygon x:Name="TopTailPolygonHighlight"
                                         Grid.Row="0"
                                         Grid.Column="2"
                                         Margin="{StaticResource TeachingTipTopHighlightOffsetForBorder}"
                                         VerticalAlignment="Top"
                                         Fill="{TemplateBinding Background}"
                                         Stroke="{ThemeResource TeachingTipTopHighlightBrush}"
                                         StrokeThickness="{StaticResource TeachingTipTopHighlightHeight}"
                                         Points="0,10 10,0 20,10"/>
                                <Grid x:Name="ContentRootGrid"
                                      AutomationProperties.LandmarkType="Custom"
                                      Background="{TemplateBinding Background}"
                                      BorderBrush="{TemplateBinding BorderBrush}"
                                      FlowDirection="{TemplateBinding FlowDirection}"
                                      Grid.Row="1"
                                      Grid.Column="1"
                                      Grid.ColumnSpan="3"
                                      Grid.RowSpan="3"
                                      contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
                                      contract7NotPresent:CornerRadius="{ThemeResource OverlayCornerRadius}">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="*"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Border x:Name="HeroContentBorder"
                                            Grid.Row="0"
                                            Child="{TemplateBinding HeroContent}"
                                            Background="{TemplateBinding Background}"/>
                                    <Grid x:Name="NonHeroContentRootGrid" Grid.Row="1">
                                        <ScrollViewer Foreground="{TemplateBinding Foreground}"
                                                      VerticalScrollBarVisibility="Auto">
                                            <StackPanel Margin="{StaticResource TeachingTipContentMargin}">
                                                <Grid Grid.Row="0">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto"/>
                                                        <ColumnDefinition Width="*"/>
                                                    </Grid.ColumnDefinitions>

                                                    <Border x:Name="IconBorder" Grid.Column="0" Child="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.IconElement}"/>
                                                    <StackPanel x:Name="TitlesStackPanel" Grid.Column="1">
                                                        <TextBlock x:Name="TitleTextBlock" Grid.Column="0" Text="{TemplateBinding Title}" TextWrapping="WrapWholeWords" FontWeight="SemiBold"/>
                                                        <TextBlock x:Name="SubtitleTextBlock" Grid.Row="1" Text="{TemplateBinding Subtitle}" TextWrapping="WrapWholeWords"/>
                                                    </StackPanel>
                                                </Grid>
                                                <ContentPresenter x:Name="MainContentPresenter" Grid.Row="1" Content="{TemplateBinding Content}"/>
                                                <Grid Grid.Row="2">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*"/>
                                                        <ColumnDefinition Width="*"/>
                                                    </Grid.ColumnDefinitions>
                                                    <Button x:Name="ActionButton"
                                                            HorizontalAlignment="Stretch"
                                                            Content="{TemplateBinding ActionButtonContent}"
                                                            Style="{TemplateBinding ActionButtonStyle}"
                                                            Command="{TemplateBinding ActionButtonCommand}"
                                                            CommandParameter="{TemplateBinding ActionButtonCommandParameter}"/>
                                                    <Button x:Name="CloseButton"
                                                            HorizontalAlignment="Stretch"
                                                            Content="{TemplateBinding CloseButtonContent}"
                                                            Style="{TemplateBinding CloseButtonStyle}"
                                                            Command="{TemplateBinding CloseButtonCommand}"
                                                            CommandParameter="{TemplateBinding CloseButtonCommandParameter}"
                                                            Grid.Column="1"/>
                                                </Grid>
                                            </StackPanel>
                                        </ScrollViewer>
                                        <Button x:Name="AlternateCloseButton"
                                                Width="{StaticResource TeachingTipAlternateCloseButtonSize}"
                                                Height="{StaticResource TeachingTipAlternateCloseButtonSize}"
                                                Background="Transparent"
                                                VerticalAlignment="Top"
                                                HorizontalAlignment="Right"
                                                BorderThickness="{ThemeResource TeachingTipAlternateCloseButtonBorderThickness}"
                                                Foreground="{TemplateBinding Foreground}">
                                            <Viewbox Width="{StaticResource TeachingTipAlternateCloseButtonGlyphSize}"
                                                     Height="{StaticResource TeachingTipAlternateCloseButtonGlyphSize}">
                                                <SymbolIcon Symbol="Cancel"/>
                                            </Viewbox>
                                        </Button>
                                    </Grid>
                                </Grid>
                                <Grid x:Name="TopHighlightLeft"
                                      Grid.Row="1"
                                      Grid.Column="1"
                                      Grid.ColumnSpan="3"
                                      Height="{StaticResource TeachingTipTopHighlightHeight}"
                                      VerticalAlignment="Top"
                                      HorizontalAlignment="Stretch"
                                      Background="{ThemeResource TeachingTipTopHighlightBrush}"
                                      Margin="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.TopLeftHighlightMargin}"/>
                                <Grid x:Name="TopHighlightRight"
                                      Grid.Row="1"
                                      Grid.Column="1"
                                      Grid.ColumnSpan="3"
                                      Height="{StaticResource TeachingTipTopHighlightHeight}"
                                      VerticalAlignment="Top"
                                      HorizontalAlignment="Stretch"
                                      Background="{ThemeResource TeachingTipTopHighlightBrush}"
                                      Margin="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.TopRightHighlightMargin}"/>
                            </Grid>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>

@nilaysanghvi To customize the teching tip background, would overriding the TeachingTipTransientBackground resource be a solution for you here? You would have to override it on the app level.

@Felix-Dev Thankyou for your prompt reply. I am sorry the solution given by you would not work for me. As I said, I need to customize other things as well. For example, I do not want the vertical scroll bars to appear but I cannot override the behaviour as it is set in the Xaml file. The scroll bars automatically appear on hovering on the edge of the Teaching tip

For example, I do not want the vertical scroll bars to appear but I cannot override the behaviour as it is set in the Xaml file. The scroll bars automatically appear on hovering on the edge of the Teaching tip
@nilaysanghvi This particular bug was fixed in OR https://github.com/microsoft/microsoft-ui-xaml/pull/2748 and is included in the newest WinUI 2.5 preview versions.

@Felix-Dev Thanks. But still, is there any way to edit the XAML file of the Teaching Tip?

About the XAML parse error: If your app runs on 1809 or newer you can keep line 15 (<contract7Present:Setter Property="CornerRadius" Value="{ThemeResource OverlayCornerRadius}" />) but remove the contract7Present prefix (since it will always be fulfilled).
If you need to target OS versions older than 1809, one solution here is to define *two TeachingTip styles (one for 1809 and above and one for 1803 and below). So you would have one TeachingTip style named like "MyTeachingTipStyle" with the contrasz7Present conditional XAML present (and no contract7NotPresent XAML) and a "MyPre1809TeachingTipStyle" containign the contract7NotPresent conditional XAML.
The unse them like this:
<TeachingTip contract7Present:Style="{StaticResource MyTeachingTipStyle}"
                     contract7NotPresent:Style="{StaticResource MyPre1809TeachingTipStyle}" />

I just tested modifying the TeachingTip style in a local test project and everything appears to be working (after taking care of the pointed out line 15 to avoid the XAML compiler error). My test project only targets 1809+ so I could simply remove the "contract7Present" from the setter.

@Felix-Dev Thanks. But still, is there any way to edit the XAML file of the Teaching Tip?

If a customization knob you require is not available your only immediate option is to retemplate the control. I think that the points that you have brought up so far all have resources or api's associated with them that will allow you to customize them, but if you have more that don't then retemplating is your way to go. Or you can tell us about them and we can discuss adding them to a future release.

@Felix-Dev My app targets both the versions. I do not understand why but the solution given by you doesn't work for me. However, I have found a workaround. Since I do not require corner radius, I have removed all the conditional XAML setters from the TeachingTip.xaml file (and not just the one that was giving error on Line 15), and now it is working fine and I am able to edit the XAML file according to my needs.

@nilaysanghvi if you could enumerate the changes that you end up making to the xaml file, so we could potentially expand the customization points on the control, that would be really great.

@StephenLPeters I am not sure if my changes would be useful to you since they are very specific to my requirements. For example, I have shifted the subtitle's location to be in the same row as the Action button and Close button. Also, rather than the Close button being Stretched to cover the available space, I have set it to take in only the space that is required.

Are you forced to do this because there is no way to have teaching tip be non-lightdismiss and not display either of its close buttons and you don't like the layout of the default close buttons? I wonder if this is an argument to allow a tip without a close button with the understanding that the app author is providing their own button that will close the tip.

@StephenLPeters Yes, that is the reason I am doing this. Also, an easier solution would be to have no close button and subtitle, and add my own button and textbox in the content of the teaching tip. However, the problem with that is the narrator announces press F6 to go to the teaching tip but that does not work with LightDismiss true and with no close or action buttons.

@nilaysanghvi To customize the teching tip background, would overriding the TeachingTipTransientBackground resource be a solution for you here? You would have to override it on the app level.

I am having trouble changing the background color of a TeachingTips.
These codes below appear to do nothing to the background of a new MUXC.TeachingTip(){Content = "Something"}
teachingTips.Resources["TeachingTipTransientBackground"] = new SolidColorBrush(Colors.Red);
OR
        Application.Current.Resources["TeachingTipTransientBackground"] = new AcrylicBrush()
        {
            Opacity = 1,
            TintColor = Colors.Red,
            TintOpacity = 1,
            FallbackColor = Colors.Red,
            TintLuminosityOpacity = 1,
            BackgroundSource = AcrylicBackgroundSource.HostBackdrop,
        };

Tried the Backrgound property and it does nothing as well.

@nilaysanghvi To customize the teching tip background, would overriding the TeachingTipTransientBackground resource be a solution for you here? You would have to override it on the app level.

I am having trouble changing the background color of a TeachingTips.
These codes below appear to do nothing to the background of a new MUXC.TeachingTip(){Content = "Something"}
teachingTips.Resources["TeachingTipTransientBackground"] = new SolidColorBrush(Colors.Red);
OR
        Application.Current.Resources["TeachingTipTransientBackground"] = new AcrylicBrush()
        {
            Opacity = 1,
            TintColor = Colors.Red,
            TintOpacity = 1,
            FallbackColor = Colors.Red,
            TintLuminosityOpacity = 1,
            BackgroundSource = AcrylicBackgroundSource.HostBackdrop,
        };

Tried the Backrgound property and it does nothing as well.

authors: Felix-Dev StephenLPeters nilaysanghvi shresthasource


text:
Cannot open include file: 'Microsoft.UI.Composition.h'

Describe the bug
When including the file 'microsoft.ui.composition.interop.h' it tries to include 'Microsoft.UI.Composition.h':
#include <Microsoft.ui.composition.h>
The file could not be found, and I also can't find it anywhere on my system. There's a winrt generated version, but I think that's not the right file, and using it generates a bunch of errors in the 'microsoft.ui.composition.interop.h'. Am I missing something?
For context, I'm trying to interop with native C++ API.
Steps to reproduce the bug

Create a project from "Blank App, Packaged (WinUI 3 in Desktop)".
Add '#include <microsoft.ui.composition.interop.h>' to pch.h.

Expected behavior
The solution builds without errors.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.2.3: 1.2.230118.102
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response

This is one of those situations where it is easy to grab the wrong header if you are not careful, and it isn't documented afaik.
But the header you want is winrt/microsoft.ui.composition.interop.h. This header is written to interop with C++/WinRT. This header is also not a generated one, it is in the Windows App SDK package.
The header you are trying to use is for the C ABI, these headers aren't included with the Windows App SDK package by default, but you can generate them using the abi.exe tool. This tool can be downloaded from Nuget. But these headers would expose the raw interfaces.
But anyway, with the C++/WinRT header, what errors are you getting? I just created a new WinUI 3 project, included the winrt version of this header and then built the project and it built successfully.

Thank you, that was very helpful and clarified things for me.
When talking about C++/WinRT header, I meant the "winrt/microsoft.ui.composition.h", not "winrt/microsoft.ui.composition.interop.h". Out of desparation I changed "microsoft.ui.composition.interop.h" file (C ABI, as you pointed out) to include "winrt/microsoft.ui.composition.h" and that, of course, gave me errors. So no bugs there.
As for my overall goal, I was trying to get a Direct2D device context from Win2d's CanvasDrawingSession. Following this example, I included "Microsoft.Graphics.Canvas.h", which is a header for the C ABI, as I now understand. It includes "microsoft.ui.composition.h", which was missing, and that led me to investigate "microsoft.ui.composition.native.h", which does the same. And then I wrote here.
So in the end, seems like I'll have to generate C ABI for Windows App SDK, so that Microsoft.Graphics.Canvas.h works correctly. Unless Direct2d has winrt headers and win2d exposes instances for them somehow.

The thing is, I do mean winrt/microsoft.ui.composition.interop.h.
As far as Win2D's headers are concerned, did you add the Microsoft.Graphics.Win2D NuGet package? This causes C++/WinRT to generate the winrt/Microsoft.Graphics.Canvas.h file.

Ah, I see what I missed there. I missed the fact that there was a single ICanvasDevice usage near the bottom.
You can get abi.exe from the Microsoft.Windows.AbiWinRT NuGet package.

authors: DarranRowe dmitry-egorov


text:
Getting exceptions randomly when closing a WinUI3 app with TabView controls.

Describe the bug
The following exception is thrown randomly when closing a WinUI3 app that contains TabView controls in its UI.
The given object has already been closed/ disposed and may no longer be used.

Call Stack:

Steps to reproduce the bug

Create a C++ WinUI3 project using "Blank App, Packaged (WinUI 3 in Desktop)" template.
Make it as unpackaged application using the steps described in the following link.
https://learn.microsoft.com/en-us/windows/apps/winui/winui3/create-your-first-winui3-app#unpackaged-create-a-new-project-for-an-unpackaged-c-or-c-winui-3-desktop-app
Add TabView controls to MainWindow.xaml
Build the application.
Run the application.
Interact with the TabView controls.
Close the application.

Expected behavior
Application should close without throwing any exception.
Screenshots
No response
NuGet package version
Windows App SDK 1.3.2: 1.3.230602002
Packaging type
Unpackaged
Windows version
Windows 10 version 22H2 (19045, 2022 Update)
IDE
Visual Studio 2022
Additional context
The exception is throwing only randomly. Can not be reproduced every time.
A test application is also attached.
Tab_TestApp.zip

@Ajith-GS this might already be fixed in WASDK 1.4. Can you please give it a try and report back ?

@Ajith-GS this might already be fixed in WASDK 1.4. Can you please give it a try and report back ?

Thank you for your response, I will check and update.

This problem still exists in latest WASDK 1.5 (1.5.240607001).

Sorry for the delayed response. Can you verify if the problem still persists in 1.6.

authors: Ajith-GS karkarl ranjeshj


text:
fix flake8 linting errors in ml-wrappers after new flake8 release

fix flake8 linting errors in ml-wrappers after new flake8 release
Copilot summary:
This pull request includes changes to the exception handling in various files to catch specific exceptions and ignore linting rules. The most important changes include updating the exception handling in the text_model_wrapper.py and image_model_wrapper.py files to catch specific exceptions instead of all exceptions.
Main exception handling changes:

python/ml_wrappers/model/text_model_wrapper.py: Updated the except block to catch specific exceptions and ignore a specific linting rule.
python/ml_wrappers/model/image_model_wrapper.py: Updated the exception handling in the try-except block to catch only specific exceptions instead of all exceptions.

Other exception handling changes:

python/ml_wrappers/common/gpu_kmeans.py: Updated the exception handling in the gpu_kmeans.py file, specifying BaseException and ignoring a specific linting rule.
python/ml_wrappers/dataset/dataset_utils.py: Updated the exception handling in dataset_utils.py to specify BaseException and added a noqa comment to ignore a specific linting rule.
python/ml_wrappers/model/model_utils.py: Updated the exception handling in the model_utils.py file, specifying BaseException and ignoring a specific linting rule.

Codecov Report
Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (5139ef0) 75.72% compared to head (11ef755) 69.82%.

Files
Patch %
Lines

python/ml_wrappers/dataset/dataset_utils.py
0.00%
1 Missing :warning:

python/ml_wrappers/model/image_model_wrapper.py
0.00%
1 Missing :warning:

python/ml_wrappers/model/model_utils.py
0.00%
1 Missing :warning:

python/ml_wrappers/model/text_model_wrapper.py
0.00%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
- Coverage   75.72%   69.82%   -5.90%
==========================================
  Files          27       27
  Lines        1866     1866
==========================================
- Hits         1413     1303     -110
- Misses        453      563     +110

Flag
Coverage Δ

unittests
69.82% <20.00%> (-5.90%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

authors: codecov-commenter imatiach-msft

repo: microsoft/ml-wrappers