<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom Visual to distinguish between Power BI Desktop and Power BI service in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-to-distinguish-between-Power-BI-Desktop-and-Power/m-p/1621858#M27487</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/133382"&gt;@Husain&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I don't commercialise my visuals but I presume that you'll want to look at the &lt;FONT face="courier new,courier"&gt;&lt;A href="https://github.com/microsoft/powerbi-visuals-api/blob/8fe88399c5ba82feeec4541ce5bf8e02a3ecd15a/index.d.ts#L1495" target="_self"&gt;hostEnv&lt;/A&gt;&lt;/FONT&gt; property on the &lt;FONT face="courier new,courier"&gt;options (IVisualHost)&lt;/FONT&gt; object exposed in the constructor &lt;FONT face="courier new,courier"&gt;method&lt;/FONT&gt;. This value is from the &lt;FONT face="courier new,courier"&gt;&lt;A href="https://github.com/microsoft/powerbi-visuals-api/blob/8fe88399c5ba82feeec4541ce5bf8e02a3ecd15a/index.d.ts#L1439" target="_self"&gt;CustomVisualHostEnv&lt;/A&gt;&lt;/FONT&gt; enum and you should be able to use it to distinguish the current host environment.&lt;/P&gt;
&lt;P&gt;As this is only available at instantiation, you would probably use the constructor to set up the watermark element based on your criteria, but if your logic handles this outside the &lt;FONT face="courier new,courier"&gt;constructor&lt;/FONT&gt; then I would store this value in a separate class property for later on if needed.&lt;/P&gt;
&lt;P&gt;Also: it looks like this was &lt;A href="https://github.com/microsoft/powerbi-visuals-api/commit/d566c25fb22ed96f7f91418eb23d9d9987a88a29#diff-7aa4473ede4abd9ec099e87fec67fd57afafaf39e05d493ab4533acc38547eb8" target="_self"&gt;introduced in 3.2.0 of powerbi-visuals-api&lt;/A&gt;, so ensure you have at lease that version for it to be usable in your project.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jan 2021 19:15:48 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2021-01-25T19:15:48Z</dc:date>
    <item>
      <title>Custom Visual to distinguish between Power BI Desktop and Power BI service</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-to-distinguish-between-Power-BI-Desktop-and-Power/m-p/1620587#M27475</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed that some of the latest custom visuals which require additional purchase have implemented this feature where&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;" In Power BI Desktop, visual can be used without restrictions. However in Power BI Online service it displays &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;a watermark.&lt;/STRONG&gt;&lt;/FONT&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you guide how this is possible with power Bi visuals SDK or api?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/184579"&gt;@v-lionel-msft&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 10:30:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-to-distinguish-between-Power-BI-Desktop-and-Power/m-p/1620587#M27475</guid>
      <dc:creator>Husain</dc:creator>
      <dc:date>2021-01-25T10:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual to distinguish between Power BI Desktop and Power BI service</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-to-distinguish-between-Power-BI-Desktop-and-Power/m-p/1621858#M27487</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/133382"&gt;@Husain&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I don't commercialise my visuals but I presume that you'll want to look at the &lt;FONT face="courier new,courier"&gt;&lt;A href="https://github.com/microsoft/powerbi-visuals-api/blob/8fe88399c5ba82feeec4541ce5bf8e02a3ecd15a/index.d.ts#L1495" target="_self"&gt;hostEnv&lt;/A&gt;&lt;/FONT&gt; property on the &lt;FONT face="courier new,courier"&gt;options (IVisualHost)&lt;/FONT&gt; object exposed in the constructor &lt;FONT face="courier new,courier"&gt;method&lt;/FONT&gt;. This value is from the &lt;FONT face="courier new,courier"&gt;&lt;A href="https://github.com/microsoft/powerbi-visuals-api/blob/8fe88399c5ba82feeec4541ce5bf8e02a3ecd15a/index.d.ts#L1439" target="_self"&gt;CustomVisualHostEnv&lt;/A&gt;&lt;/FONT&gt; enum and you should be able to use it to distinguish the current host environment.&lt;/P&gt;
&lt;P&gt;As this is only available at instantiation, you would probably use the constructor to set up the watermark element based on your criteria, but if your logic handles this outside the &lt;FONT face="courier new,courier"&gt;constructor&lt;/FONT&gt; then I would store this value in a separate class property for later on if needed.&lt;/P&gt;
&lt;P&gt;Also: it looks like this was &lt;A href="https://github.com/microsoft/powerbi-visuals-api/commit/d566c25fb22ed96f7f91418eb23d9d9987a88a29#diff-7aa4473ede4abd9ec099e87fec67fd57afafaf39e05d493ab4533acc38547eb8" target="_self"&gt;introduced in 3.2.0 of powerbi-visuals-api&lt;/A&gt;, so ensure you have at lease that version for it to be usable in your project.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 19:15:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-to-distinguish-between-Power-BI-Desktop-and-Power/m-p/1621858#M27487</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2021-01-25T19:15:48Z</dc:date>
    </item>
  </channel>
</rss>

