Make Action Button Blue - adaptive-cards

I am using Adaptive Cards 1.2 and displaying these cards in MS Teams. I want to set the color as blue for the action button. I tried setting Style property but no luck.
card.Actions = new List()
{
new AdaptiveSubmitAction
{
Title = "Confirm",
DataJson = "{ \"Type\": \"find-usr-common-meeting-slot\" }",
Style="positive",
}
};

Teams Does not support Card action button styling in cards. This is by design. The same is mentioned as a note here https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-actions?tabs=json#adaptive-cards-actions

not 100% sure but based on the designer: https://www.adaptivecards.io/designer/ , when you select either MS Teams Light or Dark it just ignores the style property.
Colors for Buttons are based on the Host. As far as I remember, MS Teams just wants the buttons to look the same so you can't change the style.

Related

Change MuiDataGrid toolbarContainer buttons style for light theme

Can someone explain to me how to get to these buttons in the DataGrid?
I want to change the color which atm. looks like this although they are not disabled.
How am I supposed to select the classes correctly to get to the buttons? I actually fixed this by just styling with the sx prop
sx={{
'& .MuiDataGrid-toolbarContainer': {
'& .MuiButton-text': {
color: '#074682',
},
},
}}
But I would like to do this in my theme (components) for light mode here
I read the css documentation of DataGrid on Mui and I'm confused about how to get deeper into toolbarContainer.
Any help is appreciated. I really want to understand this and not just try out stuff.
I can see:
MuiDataGrid-root
MuiDataGrid-toolbarContainer
THEN
MuiButton-text
Would I then just select them in that order?
EDIT:
This also works:
But why can't I just select the MuiButton, then the text and then add the color like this:

mgt person with template as personCard in the fluent ui detailslist column is not render properly

i have a column with mgt-person component on hover i am able to view the person card in the fluent ui detailslist the problem is that the person card is visible only half,
how do we pop it out ?
when i inspect in browser and added css
ex margin-Bottom:100% for the class person-details-container
poped out personcard
it popout like this, but when i add css in the files like this margin-bottom is not working but background color is working
mgt-person {
--person-card-background-color: pink;
--person-card-margin-bottom:100%; --- this doesnt work
}

Maquette JS Conditional CSS

I am trying to create an array of 'li' elements that hold icons for app level navigation. I have a css class "is-active" that highlights the active 'li' element in the list indicating the active location in the nav schema. I expect Maquette JS to render the appropriate icon as 'highlighted' when it is selected by the end user. I am trying to use the classes:{} property as such:
"classes": this._activeNavElementId === navItem.id ? "nav-menu-item nav-menu-item-is-active" : "nav-menu-item", ...
Clearly this is an improper use. The tutorial provides an example where the boolean determines if a class is in the classList; however, I actually need to use classList A if true or classList B if false.
Having a hard time finding good examples of maquettejs conditional css. Any thoughts?
Conditional CSS classes work as follows:
h("li.nav-menu-item", {
"classes": {
"nav-menu-item-is-active": this._activeNavElementId === navItem.id
}
}

How to set MasterPage body's color from ContentPage in code behind

So I've got this dropdownlist and I want to change the whole websites background color using it.
This is my MasterPage body:
<body style="overflow: auto;" runat="server" id="bodyMasterPage">
And I'm trying to set the background like this.
var body = Master.FindControl("bodyMasterPage");
if (ddlColor.SelectedValue == "Green")
{
body.Attributes.Add("background-color", "Green");
}
But when I try add the Attributes to the body, I get an error saying:
"Control does not contain a definition for 'Attributes'..."
So my question is, how should I go about actually changing the background color of the MasterPage from here?
The compiler is telling very well exactly what kind of error you are dealing with, Master.FindControl returns an object of type Control which doesn't an Attributes property. Control objects, however, can be casted to a specific type they correspond to. In our case HtmlGenericControl can do the job.
You have to include the appropriate namespace first by adding the following line on top of the page:
using System.Web.UI.HtmlControls;
And then you can adapt your example with this:
var body = (HtmlGenericControl)Master.FindControl("bodyMasterPage");
body.Attributes["style"] += " background-color: green;";
Be careful how you are using the attributes, what you have shown in your code would have created an attribute of type background-color with value Green, and what you really want is either add a class to the body or directly access the style attribute like I did but adding your value to it.
I specifically used the addition assignment operator, in case you have any other styles on the body so you don't overwrite them and just include your change. However if you want to completely rewrite it you can change it around or use your approach with proper attribute name (style).

Content Transition Windows Phone

I have 2 viewboxes in my page and currently I am doing this:
ViewBox1.Visibility = Visibility.Collapsed;
ViewBox2.Visibility = Visibiltiy.Visible;
That means upon some button press, I am hiding first viewbox and showing the second one. Now, upon hiding I want a simple transition animation like viewbox1 sliding out and viewbox2 sliding in, something like this.
I have installed WPF toolkit, but can't figure this out.
Any help is highly appreciated.
Currently I have found this solution, this is actually full page transition but it works for me, I am sharing this code here:
SlideTransition transition = new SlideTransition();
transition.Mode = SlideTransitionMode.SlideLeftFadeIn;
PhoneApplicationPage page = (PhoneApplicationPage)((PhoneApplicationFrame)Application.Current.RootVisual).Content;
ITransition trans = transition.GetTransition(page);
trans.Completed += delegate
{
trans.Stop();
};
trans.Begin();