cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ashlega
Level 8

Custom control styling

Hi,

 

  If I wanted to have a custom input control that had some validations, and, possibly, other logic behind it... How would I style it so that it matched the styles of the out-of-the-box controls? (height, width, border, fonts, etc) 

 

  Should I just look up the styles on the OOB controls and re-use them? I'm guessing it would not be "supported" since it's just short of working with the HTML. Would not want to re-create the styles in my own css files since, sooner or later, they will get out of sync with the oob styles.

 

Thanks,

Alex

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps Staff FilipK
Power Apps Staff

Re: Custom control styling

Hi @ashlega there is currently no good way to do this in preview.  For GA of PCF, we plan to make these values available to the control developer through our new theming system.

- not filipk@microsoft.com, please private message me if you can't share with everyone

View solution in original post

7 REPLIES 7
Power Apps Staff AnqiChen
Power Apps Staff

Re: Custom control styling

hi Alex,

 

It looks like a similar question. This is one way that could achieve this.  There definitely could have other ways.

 

https://powerusers.microsoft.com/t5/PowerApps-Component-Framework/Use-SetNotification-to-show-error-...

 

Anqi

ashlega
Level 8

Re: Custom control styling

Hi Anqi,

 

  thank you for the reply. It seems that's a different question, though. What I am asking is that on the screenshot below I need my Regex Validation custom "input" control to mimic the styles of the out-of-the-box "name" input control. Otherwise, the border is different, yet it does not disappear when the focus moves to another control, the font is not "bold" , etc etc. There might be no easy way to achieve that right now without recreating the styles, but I just wanted to confirm (also, in that case, maybe you would consider exposing default styles so we could reuse them in the PCF?)test.PNG

Highlighted
Power Apps Staff FilipK
Power Apps Staff

Re: Custom control styling

Hi @ashlega there is currently no good way to do this in preview.  For GA of PCF, we plan to make these values available to the control developer through our new theming system.

- not filipk@microsoft.com, please private message me if you can't share with everyone

View solution in original post

Power Apps Staff AnqiChen
Power Apps Staff

Re: Custom control styling

Filip is right, in addition:

 

If it's simply regex validation, it could use OOB control with clientAPI onchange handler to trigger notification.

ashlega
Level 8

Re: Custom control styling

Thanks!

 

PS. Client API with OOB would work, of course, but I'm mosly just trying to see what's doable with PCF.

AndrewLyMVP
Level 8

Re: Custom control styling

Hey Alex, I was thinking the same thing.. i had a powerapp idea for that:

Re: [Idea] Harness should use standard CRM font

 

 

ashlega
Level 8

Re: Custom control styling

Ah... perfect. Just voted (and added a comment asking for a bit more:)) )

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Users online (8,562)